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

Multiselect-clear element should not be rendered when canDeselect is set #61

Closed
Adesin-fr opened this issue Apr 21, 2021 · 4 comments
Closed

Comments

@Adesin-fr
Copy link

Version

  • Vue version: 3

Description

I've setup the multiselect in single mode, with canDeselect set to FALSE.
When the item is selected, the "cross button" on the right side of the list still appears, and that's confusing.
I think this cross button should not be rendered, perhaps modifiing the v-if part and adding && canDeselect

Thanks for your feedback

BKirev added a commit to BKirev/multiselect that referenced this issue May 12, 2021
Fix clear element(x) showing on the right when canDeselect = false

References this issue: vueform#61
@adamberecz
Copy link
Collaborator

Thanks @BKirev for the PR I've added it with tests in 1.5.0.

@douglasmanzelmann
Copy link

@adamberecz It's possible I'm doing something incorrect here, but this still isn't working with Vue3 and 1.5.0.

          <Multiselect
            v-if="hasAccess"
            v-model="selectedCustomerId"
            :options="customerIds"
            canDeselect="false" />

I've attempted with can-deselect="false" as well.

@adamberecz
Copy link
Collaborator

Try :canDeselect="false" (starts with :)

@douglasmanzelmann
Copy link

@adamberecz I'm an idiot. Thank you. I appreciate the quick response.

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

No branches or pull requests

3 participants