Hello, I’m very new to coding and trying to learn while building a website for a client. I created a category page for product test properties that has a dropdown where a user can choose the property and view those results (working on this page: https://kspencer-content-1.editorx.io/my-site-4/test-property )
This works perfectly with the following code:
import wixData from ‘wix-data’ ;
$w . onReady (() => {
$w ( ‘#datasetInstruments’ ). onReady (() => {
$w ( '#dropdownTestProperty' ). onChange (() => {
search ();
})
function search () {
let productFilter = wixData . filter ();
let testProperty = $w ( "#dropdownTestProperty" ). value ;
if ( testProperty && testProperty !== 'All' ) {
productFilter = productFilter . eq ( "testProperty" , testProperty );
}
$w ( '#datasetInstruments' ). setFilter ( productFilter )
}
});
});
What I am trying to do now is duplicate the page, because one will be created for every test property, and have those results displaying first, but still able for someone to chose a different property from the dropdown.
Here is the page I’m currently working on: https://kspencer-content-1.editorx.io/my-site-4/brightness
I have changed the dropdown to show the proper test property and the dropdown still works when a different property is chosen, but I cannot get the repeater to show the “Brightness” tag results when the page loads.
Any help is greatly appreciated!