Skip to content

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

Closed
@skmd87

Description

@skmd87

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

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions