-
Notifications
You must be signed in to change notification settings - Fork 410
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
[FeatureEditor] - Allow editing by fields #9849
Comments
Currently, if we add editable prop by field for FeatureEditor plugin, this not works fine because editor mode can be activate from each other editable column. By default, react-data-grid seems correctly check that field is editable or not and need a dble click to open cell editor view. https://codepen.io/gaetanbrl/pen/OJqyZzQ Here mapstore example where Maybe MapStore2 |
@offtherailz do you know why cell editor still open when we click on other cell ? is this what you want ? |
I found 2 others alternatives. Solution - Use
|
render() { | |
return (<input | |
{...this.props.inputProps} | |
style={!this.state.validated || this.state.isValid ? {} : { | |
borderColor: 'red' |
Here, the nom
field is disabled and cursor show red circle on hover (ease to understand by all users) :
Solution - Return null Editor
tested and works fine
The solution needs to change Editor code to render null
if the column is not editable.
Here, the nom
field is not editable :
Here an Editor (<input>
) code example for this solution :
According to https://groups.google.com/g/mapstore-developers/c/D717X0rzQHQ This issue will include possibility to edit geometry or not. The pull request will contains more details. |
Description
According to the new Fields UI, it could be usefull to manage edition by fields.
This could be an answer to this use case :
Many way exists to do that.
I propose first to manage this by customEditorOptions in order to use regeEx control on field name. Then, editors can catch the props and affect editable value (true/false).
Next, I imagine in a second time to manage this type of configuration by the new
fields
UI. This requires to create a new columns in Fields table but it could be less good than expected. So, another way to do that infields
is to create a "settings" button by fields to open a modal and display many options asallowEdit
and future improvements (i will create new ones).I know that geoserver will always allow edition if someone use Qgis with the correct credentials, but we have many cases where basic user profile just use mapstore and needs to be regulated.
What kind of improvement you want to add? (check one with "x", remove the others)
Other useful information
Please, share your point of view and technical advices according to mapstore2 good practices and possibility.
The text was updated successfully, but these errors were encountered: