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

Password field with the dual flag and an array in append keeps appending buttons #3883

Closed
mmourafiq opened this issue Aug 10, 2020 · 3 comments · Fixed by #3884
Closed

Password field with the dual flag and an array in append keeps appending buttons #3883

mmourafiq opened this issue Aug 10, 2020 · 3 comments · Fixed by #3884
Assignees
Labels

Comments

@mmourafiq
Copy link

I think that the Password field passes the append arrays by reference, when used with the dual flag it keeps appending new buttons.

We discovered this issue after migrating a similar custom component to the EUI feature introduced in this PR #3751. This is not a blocking issue, a work around is to use a ReactElement in the append key.

@thompsongl thompsongl added the bug label Aug 10, 2020
@cchaos
Copy link
Contributor

cchaos commented Aug 10, 2020

Can you explain further? My interpretation of your comment is that when using the type="dual" with an append={['array', 'of', 'stuff']} will create the password field with the dual toggle (eye), and three more append items for each of those supplied by the append prop.

This is the correct behavior as the append prop should not override the dual toggle. What is your expected behavior? Screenshots would help here.

@thompsongl
Copy link
Contributor

image

This is the problem. When clicking the show/hide button, additional buttons are added.

@chandlerprall chandlerprall self-assigned this Aug 10, 2020
@mmourafiq
Copy link
Author

mmourafiq commented Aug 10, 2020

@cchaos Sorry for the delay and for the poor description in the issue, I should have provided a reproducible example, I created this issue quickly before leaving for a meeting.
@thompsongl thank you for the example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants