Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: MdInput and MdTextarea v-model binding

Philip Keiter free asked 6 years ago


When changing from Inputs and Textareas in Vue to MdInputs and MdTextareas, one would expect v-model (two-way binding) to continue to work. Please update components as described in the Vue docs: https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components (note the line that reads ‘This ensures that the component works with v-model’)

woj.borowy pro answered 6 years ago


Is this issue resolved in the latest pro version? I can't get v-model to work properly with md-input. Regards

Mikołaj Smoleński staff commented 6 years ago

You can now get input values by listening to onChange event. Best Regards

woj.borowy pro commented 6 years ago

Would you be so kind to give a quick example? I tried to v-on:onChange="exampleMethod" on the md-input and then get the value with exampleMethod but it does not work. Thanks in advance for any hints.

Jakub Mandra staff commented 6 years ago

<mdb-input type="text" @input="getInputValue" label="Basic example"/> methods: { getInputValue (value) { console.log(value); } }

woj.borowy pro commented 6 years ago

Thanks a lot. Have a good day.

Philip Keiter free answered 6 years ago


I added fixes to the free version. They also work in the pro version if you own it and want to try the fix early before fixed in the next pro release: MdInput v-model Fix MdTextarea v-model Fix

Mikołaj Smoleński staff commented 6 years ago

Thanks a lot! We've merged Your fixes with the github repo and we're going to add them also to the pro version. Regards

Mikołaj Smoleński staff answered 6 years ago


Hi again Phillip, We've already noticed similar issue. We are going to work on it soon and fix it in one of the next releases. Thanks for all Your remarks! Regards

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Closed

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: Yes
Tags