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

How to use form values in Vue using K-List-Input #84

Open
5 of 6 tasks
Quin452 opened this issue Sep 27, 2022 · 4 comments
Open
5 of 6 tasks

How to use form values in Vue using K-List-Input #84

Quin452 opened this issue Sep 27, 2022 · 4 comments
Labels
Vue Issue with Tailwind Mobile Vue

Comments

@Quin452
Copy link

Quin452 commented Sep 27, 2022

Check that this is really a bug

  • I confirm

Reproduction link

Form, but no submission

Bug description

I am able to get the values of inputs by using the v-model field for "normal" HTML.

However, using Konsta, I cannot get the value of the input.
I have tried value, :value and v-model but none of them seem to work.

If I hard-code the value, value="Something", that does work, but I am unable to edit.

Expected Behavior

Be able to get the value.

Actual Behavior

By adding @change = "e => [variable] = e.target.value" to it, this seems to allow the value to be used/updated.

Konsta UI version

0.11.1 (in package.json) - but recently added (v 1.0 +?)

Platform/Target and Browser Versions

Windows 10, Firefox Developers Edition 106.0b4

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Konsta UI issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@Quin452 Quin452 added the Vue Issue with Tailwind Mobile Vue label Sep 27, 2022
@mortegro
Copy link

I had the same problem and tried to improve that in #90, but I am only a beginner so i am not sure if this solution has negative side-effects.

In the meantime using :value="someVar" in conjunction with @input="e => someVar=e.target.value" is working for me.

A more verbose way is shown in the FormInputs page of the kitchen-sink app (name and demoValue).

@xolider
Copy link

xolider commented Jan 31, 2023

As a workaround, I wrote the following wrapper component for k-list-input and this is working fine.
Pay attention: this is written with Vue 3 and TypeScript

image

then, just use <k-list-input-wrapper v-model="myVar"></k-list-input-wrapper> (or whatever you called your component to)

@opuu
Copy link

opuu commented Feb 11, 2023

This should be supported natively.

@JonatanGk
Copy link

I have the same issue with v-model / value. I think its not supported or bug. IMHO I think like @opuu "this should be supported natively.

<k-list-input floating-label type="text" :value="modelValue" @input="modelValue = $event.target.value" >

I have used this as a workaround to continue using the KonstaUi components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Vue Issue with Tailwind Mobile Vue
Projects
None yet
Development

No branches or pull requests

5 participants