Dataset will not view on publish site. Using dropdown list to filter repeater

Hello, I am in need of some help with my site below are the details:

  1. Dataset has been sync to live

  2. Using one dropdown list to filter a repeater

  3. Using one button to submit

  4. Using one button to reset

  5. Works great on preview but not on publish site

  6. I am currently working of the free site to build

import wixData from ‘wix-data’ ;

export function button9_click ( event ) {
search ();
}

function search ( ) {

wixData . query ( "CovenantChurches" ) 
    . contains ( "region" ,  String ( $w ( "#dropdown1" ). value )) 

    . find () 
    . then ( results  => { 
        $w ( "#repeater6" ). data  =  results . items ; 
    }); 

}

/**

  • Adds an event handler that runs when the element is clicked.
    Read more
  • @param {$w.MouseEvent} event
    */
    export function resetbutton_click ( event ) {
$w ( "#dataset1" ). setFilter ( wixData . filter ()) 

$w ( "#dropdown1" ). value  =  **undefined** ; 

}

If your code is working but not on your live site, my first suggestion would be to check the collection permissions.

It also appears that you are attempting to use the wixData API on a dataset. Take a look at this documentation which may help and let me know how it goes.

Dataset API

Wix Data and Dataset Overview