DNABeast
83
1
Vue

Targeting a checkbox and toggling its state.

Posted 5 months ago by DNABeast

I've got two checkboxes in the same object attached to the same v-model.

Let's say one is transfer1 and one is transfer2

When I click the first one, I want the second one to turn on as well (thus allowing it to toggle on or off only when the first one is on)

When I turn the first one off, I want the second one to turn off as well.

I think I want to send a checkbox=false command to a checkbox?

Something like

@click="transfer1.checked = false"

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.