Open Anubarak opened 1 year ago
Just came to report a probably related issue with events - updates for InputNumber
only occur when focus is lost, not when input happens, unlike InputText
which works fine.
Equivalent sandbox showing the event issue (and confirming the original issue) here:
https://codesandbox.io/s/still-leaf-vc33d7?file=/src/App.vue
Please check https://github.com/primefaces/primevue/issues/506
Thanks for the link to the explanation of why InputNumber
is different from the other Input types.
The specific issue I have with this is that InputNumber
therefore does not support 'as-you-type' validation. I could put a hook in to catch the input
event, and then manually call vee-validate
's validation functions on the data, but this seems like a horrible hack.
Happy to open this as a separate bug if it's too confusing having it here...
Also, it has impact on filtering table. Putting value in InputNumber and press enter does not always filter the table. Sometimes, after pressing 'enter', InputNumber field is cleared and table is not filtered, but sometimes is everything ok. InputText always works as expected.
Describe the bug
Usually you can submit forms via
enter
on inputs. This works for default<input type="text">
as well as yourInputText
component - but it does not work forInputNumber
You can check the example link below, go to an input, press
enter
and see the alert "form submitted" Works for InputText but not for InputNumberReproducer
https://codesandbox.io/p/sandbox/primevue-demo-forked-mkztsw?file=%2Fsrc%2FApp.vue%3A8%2C38
PrimeVue version
3.30
Vue version
3.x
Language
ALL
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
form should be submitted