I have 2 working sites and the search code is working on one site but not working on other
- WORKING SITE SS AND CODES
import wixData from ‘wix-data’ ;
export function input1_keyPress ( event ) {
let SearchValue = $w ( “#input1” ). value ;
$w ( “#dataset2” ). setFilter ( wixData . filter (). contains ( “email” , SearchValue ). or ( wixData . filter (). contains ( ‘mobileNumber’ , SearchValue )). or ( wixData . filter (). contains ( ‘apartmentNumber’ , SearchValue )));
}
All Variable is Correct and the DB Connection to the table is correct and DB Is on a read-only setting and the Collection setting is set to Custom after all this page is working.
https://www.lifeuno.co.in/health-code
(this above is the link of the page click on it → Press assign Health code button → Lightbox opens up → Type any text/number u see on the table’s email sections search function will work)
- NON WORKING SITES SS AND CODES
import wixData from ‘wix-data’ ;
export function input1_keyPress ( event ) {
let SearchValue = $w ( “#input1” ). value ;
$w ( “#dataset2” ). setFilter ( wixData . filter (). contains ( “email” , SearchValue ). or ( wixData . filter (). contains ( ‘mobileNumber’ , SearchValue )). or ( wixData . filter (). contains ( ‘apartmentNumber’ , SearchValue )));
}
All Variable is Correct and the DB Connection to the table is correct and DB Is on a read-only setting and the Collection setting is set to Custom but still, it is not working.
This same code I was able to use on Pages was working fine but now it’s not working.