How would I go about enabling automatic updates of search results while adjusting filters while looking at a list view.
e.g. type text into a varchar filter and hit return, adding a link to a linkMultiple filter, setting a varchar to 'Is Empty' versus 'Is not Empty'.
I would like any change to trigger a (rate-limited) automatic refetch of the collection. Currently this works already for boolean types, just not any others, and it only works when the filter is added, not when it is subsequently changed.
I added a listenTo(view, 'change') handler in views/record/search::createFilter() however the changes are not bubbling up (persumably because of the nested views). I then looked at bull.js and added listeners to all the nestedViews, some change events do bubble up however this feels like overkill as I only want this behaviour while in mode == 'search'.
I can handle the logic around rate limiting fine, I'm just unable to think of the cleanest way to detect ANY changes in a field while in search mode.
Should I hook into the reRender calls somehow? Any other suggestions?
e.g. type text into a varchar filter and hit return, adding a link to a linkMultiple filter, setting a varchar to 'Is Empty' versus 'Is not Empty'.
I would like any change to trigger a (rate-limited) automatic refetch of the collection. Currently this works already for boolean types, just not any others, and it only works when the filter is added, not when it is subsequently changed.
I added a listenTo(view, 'change') handler in views/record/search::createFilter() however the changes are not bubbling up (persumably because of the nested views). I then looked at bull.js and added listeners to all the nestedViews, some change events do bubble up however this feels like overkill as I only want this behaviour while in mode == 'search'.
I can handle the logic around rate limiting fine, I'm just unable to think of the cleanest way to detect ANY changes in a field while in search mode.
Should I hook into the reRender calls somehow? Any other suggestions?
Comment