-
Notifications
You must be signed in to change notification settings - Fork 20
Description
I took a stab at this, and it works quite well I think. I am not sure if I did the pull correctly though. I havent done many, sorry about that!
I added a search input on the List.vue page which changes the page to the same URL with a GET variable. I also added some additional methods under the loadData javascript function to add some queries. It also is smart enough where if you dont use the query syntax ( I.E manufacturer:string or location:string, and just type in string, it defaults to searching the name property)
https://github.com/icsy7867/StoreDown/blob/itemTreeSearch/src/views/List.vue
This could also be implemented with your "search" functionality as well.
It seems pretty useful. You can search specifically for a string in each column. So if you want to search for specific Tags, Names, Locations, Price Paid, Manufacturer, acquiredFrom, etc... You can easily do this. However only one at a time! Would be neat to be able to do something like location:house manufacturer:dewalt. But that would add WAY more complexity.
One caveat, though, is this is done in the DATA variable via javascript in the browser. It would be more efficient to let couchDB handle this, but you would need to add variables as indexes, and update all of your database functions to include some sort of search. However, even with 5000 items, I think this would still be decently quick.
--Examples --
I can use:
acquiredfrom:Home Depot

Which is helpful, as you entered data as "The Home Depot" and "Home Depot".

