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

Remove all items in selector mode #68

Closed
acanthis opened this issue Oct 25, 2023 · 3 comments
Closed

Remove all items in selector mode #68

acanthis opened this issue Oct 25, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@acanthis
Copy link

Hello!
How can remove all values using "selector" mode? Why is there no "remove" method in this mode?

@TerryZ
Copy link
Owner

TerryZ commented Oct 26, 2023

Just directly set v-model value to empty array to remove all selected items

template

<template>
  <SelectPageList v-model="selected" />
  <button type="button" @click="removeAll">remove all</button>
</template>

script

import { ref } from 'vue'

const selected = ref([])

function removeAll () {
  selected.value = []
}

@acanthis
Copy link
Author

acanthis commented Oct 26, 2023

@TerryZ Unfortunately, it don't work for me. The values from the component are not deleted.

https://stackblitz.com/edit/vue-l4lafc?file=src%2Fcomponents%2FHelloWorld.vue

@TerryZ TerryZ added the bug Something isn't working label Oct 27, 2023
@TerryZ
Copy link
Owner

TerryZ commented Oct 27, 2023

Fixed in v3.0.1

@TerryZ TerryZ closed this as completed Oct 27, 2023
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