Skip to content
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

Adds props to allow customizing the title and content of Confirm modals for delete buttons. #3760

Merged
merged 4 commits into from
Nov 21, 2019

Conversation

macklin-10x
Copy link
Contributor

Adds props for customizing Confirm messages for delete actions.

@fzaninotto
Copy link
Member

I'd prefer that the main component accept a confirm prop that would default to Confirm. that way, users can customize more than the title and content (that they can already customize via translation).

@macklin-10x
Copy link
Contributor Author

Well, as far as I can tell, the message for all delete confirmations can be changed via translation, but it can't be customized for each different record type. Please correct me if I'm mistaken.

How do you see the mechanics working with a confirm prop? It seems like many/most of the props passed to Confirm involve the local state defined and managed by the main component. It seems like the main things to be configured at all are the messages and translation options, but then the main component still passes in all of the callbacks?

@fzaninotto
Copy link
Member

You're right, most of the props currently passed to Confirm are computed, so it makes sense to do it as you suggested.

For BulkDeleteWithConfirm, the default label is passed as defaultProps instead of default parameter value. Would you mind making this consistent?

I'll schedule your change for 3.1.

@fzaninotto fzaninotto added this to the 3.1.0 milestone Oct 3, 2019
@macklin-10x
Copy link
Contributor Author

Fabulous! Yes I will make that tweak.

@macklin-10x
Copy link
Contributor Author

I adjusted the defaults for the bulk delete and also added PropTypes for the new props which I had forgotten to do in the initial changeset. Thanks for being so responsive and for maintaining a really useful framework!

@macklin-10x
Copy link
Contributor Author

One last question: do you have a rough guess as to when you think 3.1 will be released?

@fzaninotto
Copy link
Member

We give a rough estimate of the release dates in the milestones page. V3.1 will be published in November.

@fzaninotto fzaninotto merged commit 315b3ee into marmelab:next Nov 21, 2019
@fzaninotto
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants