shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js
https://vue-multiselect.js.org/
MIT License
6.66k stars 989 forks source link

[FEATURE] Readonly mode #1785

Open brauliobo opened 1 month ago

brauliobo commented 1 month ago

For the usecase of showing tags without having a dropdown, the input and the option to remove each tag, a readonly mode would fit it.

One simple CSS for it:

  .multiselect {
    width: auto;
    cursor: auto;

    .multiselect__select, .multiselect__tag-icon, .multiselect__content-wrapper, .multiselect__placeholder {
      display: none !important;
    }
    .multiselect__tags {
      border: none;
      .multiselect__tag {
        padding-right: 10px;
      }
    }
  }