Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Change Options Using Array Data Source #5038

Closed
ZhaofengWu opened this issue Sep 13, 2017 · 3 comments
Closed

Dynamic Change Options Using Array Data Source #5038

ZhaofengWu opened this issue Sep 13, 2017 · 3 comments

Comments

@ZhaofengWu
Copy link

ZhaofengWu commented Sep 13, 2017

In the documentation, Ajax and Array are juxtaposed as two types of data sources. However, it looks like the latter is less flexible than the former. With Ajax, you can dynamically alter the options as the input string changes, as well as having pagination. I wonder if you can do the same with javascript array?

I.e. I want to move the computation from back-end to front-end, while maintaining the ability to dynamically change the options (and hopefully pagination). Is that possible?

I am aware of the existence of matcher, but I want a little more control than simple filtering.

Note that this is not a duplicate of #2830.

@alexweissman
Copy link
Contributor

So with Ajax, <option> elements actually don't even get created until they are selected for the first time. Contrast this with an Array source, where all the <option>s are created immediately on initialization.

I'm wondering - what is the point of using pagination, if you want to preload all of the options on the client-side anyway? Generally, pagination is used to decrease the response size, and reduce the burden on the client for rendering all of the options up-front.

Please join me on my chat server to discuss this further.

@alexweissman
Copy link
Contributor

I'm actually going to close this as a duplicate of #4621.

@muthu32
Copy link

muthu32 commented Dec 6, 2017

#4621 is not a duplicate of this issue. Solution for "handling huge amounts of data" is ajax with pagination. But this solution is not applicable on this issue. Please reopen this issue and make a valid api to change data dynamically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants