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

The input value remains in the TextField even after the dialog is closed. #89

Closed
stoicjone opened this issue Feb 6, 2024 · 2 comments
Closed

Comments

@stoicjone
Copy link

First of all, I admire and applaud this very simple and great library. Thanks to you, I am using it very well.

But there is one problem. If you close and reopen the dialog box while entering the confirmationKeyword, the TextField retains the previously entered value. I don't think this behavior is very helpful to UX.

import { useConfirm } from 'material-ui-confirm';

// ...
const confirm = useConfirm();

confirm({
  title: 'Check reservation information',
  content: 'Please check your reservation information again.',
  confirmationKeyword: 'I have confirmed the contents and agree to the reservation',
  confirmationKeywordTextFieldProps: {
    size: 'small',
    placeholder: 'I have confirmed the contents and agree to the reservation',
    helperText: 'After confirming your reservation information, please enter the same information as above.',
  },
})

스크린샷 2024-02-06 092926

Is there a way to initialize the TextField input each time the Dialog is closed? What am I missing?

@stoicjone stoicjone changed the title Value remains in textField even after Dialog is closed The input value remains in the TextField even after the dialog is closed. Feb 6, 2024
@jonatanklosko
Copy link
Owner

Fixed in 0f27e18, released in v3.0.11.

@stoicjone
Copy link
Author

Wow, you fixed it really quickly. I confirmed that it works as expected. Thank you. Have a good day.

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

No branches or pull requests

2 participants