-
Notifications
You must be signed in to change notification settings - Fork 409
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
Fix #2169 added autocomplete combobox as cell editor in the feature grid #2228
Fix #2169 added autocomplete combobox as cell editor in the feature grid #2228
Conversation
…plete_featuregrid
…autocomplete # Conflicts: # web/client/plugins/TOC.jsx
* @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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
the object problem was happening because sometimes the onchange event get an object and sometimes a string.. (thanks to react-witdgets) |
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: