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

QInput clearable does not work with v-model.trim #12431

Closed
smakinson opened this issue Feb 10, 2022 · 3 comments
Closed

QInput clearable does not work with v-model.trim #12431

smakinson opened this issue Feb 10, 2022 · 3 comments
Labels
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@smakinson
Copy link
Contributor

smakinson commented Feb 10, 2022

What happened?

When the clearable button is pressed, the text is not cleared. In the devtools console you will see an error: Cannot read properties of null (reading 'trim'). This is because the clearable button sets the model to null.

What did you expect to happen?

The text to clear with no error.

Reproduction URL

https://codepen.io/smakinson/pen/MWOmVaw

How to reproduce?

Use a QInput with clearable and v-model.trim

Flavour

Quasar CLI (@quasar/cli | @quasar/app)

Areas

Components (quasar)

Platforms/Browsers

No response

Quasar info output

quasar - 2.5.0 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app - 3.3.2 -- Quasar Framework local CLI
@quasar/extras - 1.12.4 -- Quasar Framework fonts, icons and animations

Relevant log output

TypeError: Cannot read properties of null (reading 'trim')

Additional context

No response

@smakinson smakinson added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Feb 10, 2022
@github-actions github-actions bot added area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack labels Feb 10, 2022
@MilosPaunovic
Copy link
Member

Duplicate #11423, #10376, #10362

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
area/components bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

5 participants