This repository was archived by the owner on May 23, 2025. It is now read-only.
AJAX data sources and multiple tokens#16
Open
andrewsnowden wants to merge 3 commits into
Open
Conversation
Added an onFilterChanged callback which is called whenever the filter expression changes. This can fetch data remotely and use the setValues to populate the newly updated set of values. An example of using this to show Github repositories is included in the demo page.
Tokens can be passed in as an array. The token that was matched is passed into the elementFactory as well as the onFilterChanged callback
|
Thanks for that, you saved me. Note that this code is not compatible with IE8, without changes. The forEach needs changing to a regular for loop, and you need some polyfills.. Also note the code is not compatible with jfelsinger's second token delimiter regexp workaround in #6. That's fine though, that was kind of a hack. The first token delimiter workaround (removing \b) still works. |
Author
|
Thanks, will try dig out a copy of IE8 and patch and test on that as soon as I get a chance |
|
Oh, actually I assumed that this was a problem in your code, and I just realised it wasn't - it's an original 'bug' (incompatibility, really) in sew. Sorry for pinning it on you ;). |
|
Why don't you accept this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added some functionality that I needed, not sure if you'd like to pull these upstream.
You can fetch data remotely using an onFilterChanged callback and a setValues call. You can also specify a list of tokens to match (e.g. ["@", "#"]). I've added a demo for both of these functions in the demo.html