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

v-model modifier on input ruins html #656

Open
AuthorProxy opened this issue Nov 11, 2023 · 3 comments
Open

v-model modifier on input ruins html #656

AuthorProxy opened this issue Nov 11, 2023 · 3 comments
Labels
question Further information is requested

Comments

@AuthorProxy
Copy link

AuthorProxy commented Nov 11, 2023

Overview of the problem
Oruga version: [0.6.0]
Vuejs version: [3.2.47]
OS/Browser:

Description
trim modifier adds ugly modelmodifiers="[object Object]" to the final html:
<o-input v-model.trim="test_model.property" name="test_name" />

@AuthorProxy AuthorProxy changed the title <o-input v-model.trim="formSettings.provider.email_domain" name="sso_provider_domain" placeholder="Enter domain name after @" /> trim modifier ruin html Nov 11, 2023
@AuthorProxy AuthorProxy changed the title trim modifier ruin html v-model modifier on input ruins html Nov 11, 2023
@mlmoravek
Copy link
Member

@AuthorProxy I think v-model modifiers only work when used directly on an html input element. However, oruga components are just normal vue components. I don't know if v-model modifiers are also usable for components v-model. Do you have an example?

@mlmoravek mlmoravek added question Further information is requested help wanted Extra attention is needed labels Feb 1, 2024
@blm768
Copy link
Contributor

blm768 commented Feb 6, 2024

I don't think that the built-in v-model modifiers automatically work on anything but plain HTML elements, but it is possible to get the set of modifiers used on a custom component and define one's own behavior to handle them.

@AuthorProxy
Copy link
Author

@mlmoravek we can just omit them - so they not ruin final html

@mlmoravek mlmoravek removed the help wanted Extra attention is needed label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants