Hi Dojo,
in our LCA there is a table with many results. When a search is performed using the appropriate tool, some results are not loaded and a "load more" button appears at the bottom.
Is it possible to load all results directly?
Also, why is it that when adding a filter like feed, the search is performed across all results, while the built-in table filter only applies to the currently loaded results?
Thank you.
Hi Marco,
The built-in table filter and the filter input of the table component affect the data in exactly the same way. They both follow these rules (always subject to change):
- Do not fetch when there are enough filtered rows for the next page.
- Fetch at least 250 rows.
- Fetch at most 2000 rows.
- Stop fetching when a result is found.
When following these rules, there is no way to filter and fetch all data this way. Filtering all data requires a more specific filter condition, based on a specific column instead of on all columns. You can achieve this in several ways:
- Adding a filter node linked to an input to the query.
- Using a query filter component (filtered on different columns)
- Adding a custom operator linked to an input to the query.
You are probably seeing differences between the 2 filter approaches because of the timing when the filter updates the result. For the built-in filter, this happens after every keystroke while for an external filter input this happens on enter & focus lost by default. This could cause the 'load more' button to be shown when the filter input is in a different state, which means different rows are shown. Updating the filter will not trigger more data fetching when this button is already present. This last behavior is something we can improve, I have created a task on our backlog to look into this.