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

Q-Input clearable doesn't work if v-model has trim #11423

Closed
2 of 14 tasks
dariodepaolis opened this issue Nov 20, 2021 · 7 comments
Closed
2 of 14 tasks

Q-Input clearable doesn't work if v-model has trim #11423

dariodepaolis opened this issue Nov 20, 2021 · 7 comments
Labels
Qv2 🔝 Quasar v2 issues

Comments

@dariodepaolis
Copy link
Contributor

Describe the bug
Simple q-input with clearable and v-model.trim

Codepen/jsFiddle/Codesandbox (required)
https://codepen.io/dariodepaolis/pen/NWvJeao

To Reproduce
Create a q-input with clearable, set a vmodel.trim then tap on the icon

Platform (please complete the following information):
Quasar Version: v2.3.1

Quasar mode:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

Tested on:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX
@dariodepaolis dariodepaolis added the Qv2 🔝 Quasar v2 issues label Nov 20, 2021
@MilosPaunovic
Copy link
Member

Duplicate #10376

@hawkeye64
Copy link
Member

It's because Vue's trim doesn't check for null. It's expecting a string. You can raise an issue against Vue or use update:model-value and provide your own check for null and trim.

@dariodepaolis
Copy link
Contributor Author

Ok thank you, I've noticed this, I opened a bug only because it worked on Qv1, just this ;)

@hawkeye64
Copy link
Member

We can't fix this from Quasar side as it'd introduce a breaking change.

@dariodepaolis
Copy link
Contributor Author

No problem I understand and thank you for the answer!

MilosPaunovic added a commit to MilosPaunovic/quasar that referenced this issue Feb 10, 2022
rstoenescu added a commit that referenced this issue Feb 10, 2022
…0362 #12431 (#12432)

* fix(docs): Improved QInput example...

...to prevent issue duplicating

Related: [#11423, [#10376, [#10362 [#12431.

* Update input.md

Co-authored-by: Razvan Stoenescu <razvan.stoenescu@gmail.com>
@qxygene
Copy link

qxygene commented Apr 26, 2022

any update on this?

@pdanpdan
Copy link
Collaborator

@qxygene interesting, your very helpful multiple contribution missed the only place where there was an update
#10376 (comment)

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

No branches or pull requests

5 participants