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

@Kalifr use the beta channel for vue-select "vue-select": "^4.0.0-beta.1", works fine for me. Be sure to upgrade to vue: 3.2.x #1546

Closed
Archetipo95 opened this issue Dec 6, 2021 · 2 comments

Comments

@Archetipo95
Copy link

This is not working, I'm trying to change icons. I tryed with svg and emoji. Can someone help me or give me a working example?

@Kalifr use the beta channel for vue-select "vue-select": "^4.0.0-beta.1", works fine for me. Be sure to upgrade to vue: 3.2.x

btw, for anyone overriding default components =>

  • In the vue3 beta version use:
import vSelect from "vue-select";
vSelect.props.components.default = () => ({
  Deselect: CloseIcon, // CloseIcon and CaretDownIcon are vue components with svg inside of them
  OpenIndicator: CaretDownIcon,
});

Instead of:

import vSelect from "vue-select";
vSelect.props.components.default = () => ({
  Deselect: {
    render: (createElement) => createElement(CloseIcon),
  },
  OpenIndicator: {
    render: (createElement) => createElement(CaretDownIcon),
  },
});

Originally posted by @mathiash98 in #1251 (comment)

@mathiash98
Copy link

As I wrote: CloseIcon and CaretDownIcon are vue components

Put your svg and or emoji inside a Vue Component

@Archetipo95
Copy link
Author

Yep it worked, I think I was importing the wrong 😑 file...

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

2 participants