-
Notifications
You must be signed in to change notification settings - Fork 65
Updating input components' validation field to reflect existing pattern #1785
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
base: dev
Are you sure you want to change the base?
Conversation
| if (formatComponent && !formatComponent.closest("div").hasAttribute("hidden") && displayPatternSelectedValue!="custom") { | ||
| formatComponent.value = patternComponent.value; | ||
| // Preserve a previously saved pattern (when no dropdown options are present) | ||
| formatComponent.value = formatComponent.value || patternComponent.value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this also impact other components? was custom format working correctly for other components custom format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method is consumed by multiple components (textinput, telephoneinput, numberinput and datepicker) - i have tested all the components with the change added in new commit, no current functionality is broken.
| // Only update format component value if it exists and is not hidden | ||
| if (formatComponent && !formatComponent.closest("div").hasAttribute("hidden") && displayPatternSelectedValue!="custom") { | ||
| formatComponent.value = patternComponent.value; | ||
| // Only update format component value if it exists and is not hidden |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will update the pattern value from dropdown only in cases where dropdown is visible. Earlier it was updating even on manual pattern entry where the dropdown was not visible and the pattern dropdown had value "" which was rewriting the entered format value from showing up subsequently in the dialog.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
d0fcc65 to
c93234a
Compare
Description
Updating textinput core component's validation field to reflect existing pattern if entered.
Customer : Suncorp
Related Issue
E-001967925
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: