I am trying to filter a dataset,repeater & table with Data Query with the following code
export function qcountry_keyPress(event, $w) {
let searchValue = $w('#qcountry').value;
wixData.query('ArrivalFormCountry')
.contains('title', searchValue) //tried with .hasSome too
.find()
.then(res => {
$w('#repeater1').data = res.items;
} );
}
The problem is that my Database entry has the following name:
A Name, With Comma
When I start typing the word i.e. ‘A Name’ the filter works well but if I do not give the comma (,) the filter does not work
For Eg. The Filter won’t work for this: ‘A Name With Comma’
I even tried this code below:
function filter(fullName, weight, promotion) {
if (lastFilterName !== fullName) {
let newFilter = wixData.filter();
if(fullName)
newFilter = newFilter.contains('fullName', fullName) //tried with .hasSome too
According to the docs I believe .contains & .hasSome should work even if the search value does not contain the comma (,)
Thoughts ?