Fix #2169 added autocomplete combobox as cell editor in the feature grid#2228
Merged
offtherailz merged 12 commits intogeosolutions-it:masterfrom Sep 29, 2017
Merged
Conversation
…plete_featuregrid
…autocomplete # Conflicts: # web/client/plugins/TOC.jsx
offtherailz
requested changes
Sep 28, 2017
| * @memberof observables.autocomplete | ||
| * @return {external:Observable} the stream used for fetching data for the autocomplete editor | ||
| */ | ||
| const createPagedUniqueAutompleteStream = (props$) => props$.debounce(props => Rx.Observable.timer(props.delayDebounce || 0)) |
Member
There was a problem hiding this comment.
You can improve with:
const createPagedUniqueAutompleteStream = (props$) => props$
.distinctUntilChanged( ({value, currentPage}, newProps = {}) => !(newProps.value !== value || newProps.currentPage !== currentPage))
// .debounce(props => Rx.Observable.timer(props.delayDebounce || 0))
.throttle(props => Rx.Observable.timer(props.delayDebounce || 0))
.merge(props$.debounce(props => Rx.Observable.timer(props.delayDebounce || 0))).distinctUntilChanged()
This will hide quickly "No Result" message and perform a faster search (start with first insert, then throttle and emit last). Also change default time to 500
Member
Contributor
Author
|
the object problem was happening because sometimes the onchange event get an object and sometimes a string.. (thanks to react-witdgets) |
offtherailz
approved these changes
Sep 29, 2017
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Description
This PR introduce the autocomplete combobox as editor for the feature grid. It also adds a reusable and enhanced component used in the attributeEditor of the feature grid.
Issues
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
What is the current behavior? (You can also link to an open issue here)
Actually when you try to edit a string field is allows you to edit it without any autocomplete feature.
What is the new behavior?
If there is there is enabled for that layer the wps getpageunique service and the datatype of a field is a string one it shows an autocomplete combobox that filter attributes remotely.
Does this PR introduce a breaking change? (check one with "x", remove the other)
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: