Hi,
I have created a collection for 100 people and categories as A, B and C. I have created dynamic page based on categories A, B and C. If i click A than list of people within category A is published.
Now i am trying to create a code where i can search records with in that category. Have written the below code:
import wixData from ‘wix-data’
$w.onReady( function () {
});
export function iTitle_keyPress(event, $w) {
let SearchValue = $w( “#iTitle” ).value;
if ((SearchValue)) {
$w( “#dynamicDataset” ).setFilter(wixData.filter().contains( ‘title’ , SearchValue))
}};
Problem
-
but it searches data within entire database and
-
once search value is removed than it list people of all categories.
please help
Thanks