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: 6555 Missing PT Option for IconField in Password #6560

Merged

Conversation

KirilCycle
Copy link
Contributor

Defect Fixes

Fix #6555
IconField can be modified from Password component

Copy link

vercel bot commented May 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primereact ⬜️ Ignored (Inspect) Visit Preview May 3, 2024 0:47am
primereact-v9 ⬜️ Ignored (Inspect) Visit Preview May 3, 2024 0:47am

@KirilCycle KirilCycle changed the title Fix/pt option for pass ico Fix: 6555 Missing PT Option for IconField in Password May 3, 2024
@@ -85,6 +85,7 @@ export const PasswordBase = ComponentBase.extend({
header: null,
content: null,
footer: null,
iconField: null,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need this we aren't adding a new property just a new passthrough.

Copy link
Contributor Author

@KirilCycle KirilCycle May 3, 2024

Choose a reason for hiding this comment

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

Without this it wont work 'React does not recognize the iconField prop on a DOM'

Copy link
Member

Choose a reason for hiding this comment

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

I just updated your PR can you do a git pull and test again with my changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okey

@@ -481,8 +481,18 @@ export const Password = React.memo(
let input = <InputText {...inputTextProps} />;

if (icon) {
const iconField = props.iconField;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need the iconField part?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I thought that in the future it would be easier to access the needed field value

Copy link
Member

Choose a reason for hiding this comment

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

You can already change the icons with props.hideIcon etc.

            if (unmaskedState) {
                icon = props.hideIcon || <EyeSlashIcon {...hideIconProps} />;
            } else {
                icon = props.showIcon || <EyeIcon {...showIconProps} />;
            }

@KirilCycle KirilCycle requested a review from melloware May 3, 2024 12:37
@KirilCycle KirilCycle marked this pull request as ready for review May 3, 2024 12:43
@nitrogenous nitrogenous self-requested a review May 3, 2024 12:43
@nitrogenous
Copy link
Contributor

Looks good to me now what do u people think @KirilCycle @melloware

@melloware
Copy link
Member

I think these latest changes are good @nitrogenous !

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.

Missing PT Option for IconField in Password
3 participants