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

Feature: add a prop to set the underlying input type #67

Closed
Brads3290 opened this issue Nov 27, 2024 · 2 comments
Closed

Feature: add a prop to set the underlying input type #67

Brads3290 opened this issue Nov 27, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Brads3290
Copy link

I've got a text input that will accept a password, so I want the underlying input to be type=password. With the PrimeVue component, you can just set <InputText type="password" ... and it's fine; but with FormKit we already use the type attribute with type="primeInputText".

I propose adding an input-type=... prop to the components that might need it, and passing it's value directly down to the PrimeVue component.

I can make a PR for this. Just wanted to discuss first. Is there a different way to set the type of the input that I'm not considering?

@Brads3290
Copy link
Author

Ok I just found primePassword and now I feel a bit silly..

But maybe it's worth making input-type anyway? There are other text-based input types such as type="email", type=tel, etc.

Of course we could just use FormKit validation to replace those, but maybe there are reasons (accessibility?) why people might want to set the HTML input type.

@sfxcode
Copy link
Owner

sfxcode commented Nov 28, 2024

Hi,

thank you for your proposal. Just added a new inputType property to PrimeInputText.

Please give it a try,

Greetings,

Tom

@sfxcode sfxcode self-assigned this Nov 28, 2024
@sfxcode sfxcode added the enhancement New feature or request label Nov 28, 2024
@sfxcode sfxcode closed this as completed Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants