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

Fix #3092: Dropdown support required attribute #3146

Merged
merged 1 commit into from
Aug 13, 2022

Conversation

melloware
Copy link
Member

###Defect Fixes
Fix #3092: Dropdown support required attribute

@melloware melloware requested a review from mertsincan August 8, 2022 12:16

return (
<div className="p-hidden-accessible p-dropdown-hidden-select">
<select ref={inputRef} required={props.required} name={props.name} tabIndex={-1} aria-hidden="true">
<select ref={inputRef} required={props.required} value={selectedValue} name={props.name} tabIndex={-1} aria-hidden="true" onChange={(e) => selectedValue = e.target.value}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@melloware did you try defaultValue instead of value and onChange?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and it did not work the value was still not being properly updated so the OnSubmit was saying "still required"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try again

@melloware melloware merged commit 0074456 into primefaces:master Aug 13, 2022
@melloware melloware deleted the PR3092-2 branch August 13, 2022 12:55
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.

Dropdown: Required attribute doesn't work
2 participants