itemsapi / itemsjs

Extremely fast faceted search engine in JavaScript - lightweight, flexible, and simple to use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update items list - in what lifecycle hook to put itemsjs()

Kugeleis opened this issue · comments

I use this tool in a Vue SPA where the user can add items. Up to now I run itemsjs() as a static procedure before page creation. what would be the correct lifecycle hook to put itemsjs() to reevaluate the items list after the user adds an item?

You need to simply reindex data with method: itemsjs.reindex(data)

Unfortunately there are no .add, .update, .delete functions right now