-
Notifications
You must be signed in to change notification settings - Fork 782
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
Editing fields marked as non-editable when adding a new row #226
Comments
@lightheaded, could you show me the code? is all fields are non-editable? |
It's pretty much the example table code
and the props:
Now when I click "New", a popup appears that has two greyed-out fields - id and created_at. As ID is required, it is not possible to submit the form, although I don't want to submit the ID. |
would you give the |
oh. I see it. you set ``editable={false} |
btw, if you dont want id field be insert, you can set |
I edited my post to include the props as well. Sorry about that :) I do need the id field for updating the values, but the autoValue will come in handy when adding a new row (as id is currently my key column and the id is assigned by the backend, which causes delays). However with the editable=false, I would not like the created_at field to be edited, nor I want it to be filled out by user when adding a new row. I would like it to either be filled out automatically or be filled by backend without the react-bootstrap-table ever knowing about that field on insertion. Is that possible? |
@lightheaded, did you mean you want to insert row without popup modal? sorry for my poor english:) |
No I do like the popup, but I would like to configure the editability (update record) and insertion (new record) to be separately manageable. That would be great :) |
ok, but there are a lots of issues and high priority features to do, so this will take some time, maybe can't be done in near future. If you urgent to need this feature, the workaround is just using cell edit only, and you customize a popup modal for insertion Thanks :) |
When adding a new row, fields that are marked non-editable are automatically greyed out. I cannot find a way to configure the fields shown on adding a new record. It would seem like common sense that I might not want to let users edit certain fields, but when adding a new row, they should be able to enter the values in those immutable fields.
The text was updated successfully, but these errors were encountered: