Increasing performance with long options list
Increasing performance with long options list
tegra_andrew
Posts: 7Questions: 2Answers: 0
Hello,
For my editor, I have a select2 that's drawing from a long list of options (8000+). Since I'm loading all these in the initial JSON data, it's causing pretty large performance issues. Is there a way to lazy load this list instead of including it in the initial JSON load?
Thanks,
Andrew
This question has an accepted answers - jump to answer
Answers
Hi Andrew,
Yes, Select2 has remote data options. Their documentation for it is here.
One of the key things to consider when implementing it with Editor is that you need to take account of the
initialValue
parameter that is set to the server when the form is shown (so it can return the value / label for the current value).Allan
Hey Allan, thanks for your help. I was able to get that working, but I was wondering if there is a way to lazy load data with search panes too?
Or could I paginate the search pane with server side data? What would the AJAX load for something like that look like?
You can use SearchPanes with the open-source Editor server-side libraries - this example demonstrates how to do that.
Colin