magiccodingman / Magic.IndexedDb

Use IndexedDb in Blazor like LINQ!
MIT License
27 stars 8 forks source link

Contains clause not working. #11

Open robertwood62 opened 2 months ago

robertwood62 commented 2 months ago

I noticed that using the "Contains" method does not work. I think the error is in the JavaScript. Using Dexie, you can call the filter() method on the table so you don't need to use the where() mehod first. I've commented out the original line and replaced it with the line above. Seems to be working.

case 'Contains': if (!dexieQuery) { if (condition.caseSensitive) { dexieQuery = table.filter(item => item[condition.property].includes(condition.value)); //dexieQuery = table.where(condition.property).filter(item => item[condition.property].includes(condition.value));