-
Notifications
You must be signed in to change notification settings - Fork 264
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 adornment icon missing when type
is set to password
in TextFieldAdapter
#7439
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedThe changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7439 +/- ##
=======================================
Coverage 41.98% 41.98%
=======================================
Files 42 42
Lines 936 936
Branches 214 227 +13
=======================================
Hits 393 393
+ Misses 543 499 -44
- Partials 0 44 +44
Flags with carried forward coverage won't be shown. Click here to find out more. |
{ ...(endAdornment || readOnly | ||
? { | ||
InputProps: { | ||
...(endAdornment && { endAdornment }), | ||
...(readOnly && { readOnly }) | ||
} | ||
} | ||
: {}) | ||
} |
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.
I think the correct fix would be to update the oxygen ui password field component by moving {...rest} before InputProps[1]. @savindi7 @DonOmalVindula WDYT?
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.
Or we can extract InputProps
[1] and check for endAdornment before passing it to MuiTextField in PasswordField component.
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.
tagging @brionmario for further input.
Purpose
This PR addresses the issue where the adornment icon is missing when the
type
is set topassword
in theTextFieldAdapter
component. The root cause of this issue is theInputProps
overriding the password visibility toggle logic defined in Oxygen UI.The solution ensures that the
InputProps
property is conditionally applied to avoid breaking any existing components.Additionally, this PR includes the reversal of changes made in the following PR to align with this fix:
Related Issues
Checklist
Security checks