-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Option to enable/disable adding rows #1592
Comments
Btw I don't understand the solution in #465. AFAICT the request was also to be able to "disable the add button", but the issue was closed without solving this. You could also reopen that one as it already had some engagement. Our workaround works but is very hacky. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required. |
Don't close this issue. This is an automatic message by Fresh - a bot against stale bots. |
So how about: |
I believe that was the quite uncomfortable workaround we used where we had to hide and replace the button instead of simply controlling its |
Fixed with isEditable prop of editable |
Hey @Domino987, I tried The following still lets me add new rows. editable={{
isEditable: () => false
}) We'd like a way to disable adding new rows in a user-friendly manner, such as a disabled Add button (perhaps with a tooltip). There seemed to be interest from others as well. Could you re-open this issue? The following simply makes the Add button disappear: editable={{
onRowAdd: undefined
}} |
Is your feature request related to a problem? Please describe.
We'd like to disable adding rows if the client reaches a certain limit of items.
Describe the solution you'd like
Looking for an option to control the "add" button's
disabled
property just as e.g.isEditable
disables editing rows.Describe alternatives you've considered
Our alternative solution goes as follows.
editable.onRowData
toundefined
(Disable add button when Editable if the field in last row has x value #465).onRowAdd
icon.The text was updated successfully, but these errors were encountered: