Skip to content

[Bug]: true/false value unexpected behavior #57

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

Closed
1 task done
skmd87 opened this issue Oct 7, 2024 · 1 comment
Closed
1 task done

[Bug]: true/false value unexpected behavior #57

skmd87 opened this issue Oct 7, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@skmd87
Copy link

skmd87 commented Oct 7, 2024

Bug description

Hello,

When I set the true/false value on v-inline-switch, the swutch position doesn't change to refelect the value state:

<v-inline-switch
	v-model.number="item.enable"
	:true-value="1"
	:false-value="0"
	:name="sec.title +i"
	card-field
	save-icon="i-mdi:content-save"
	color="primary"
/>

First thing it shows "Type 'number' is not assignable to type 'string | boolean | undefined'.ts-plugin(2322)", but switching to v-switch accepst that.
Then I tried to to make it as string. the ts warning went away but when I click the switch, the value changes but the state doesn't change. any idea?

Steps to reproduce

try the code above

Relevant log output

No response

Reproduction link

no link

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@skmd87 skmd87 added the bug Something isn't working label Oct 7, 2024
@webdevnerdstuff
Copy link
Owner

I was able to replicate the issue. I'll try to get this updated as soon as I get a chance. Hopefully by the weekend or sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants