Skip to content

Commit

Permalink
bug(refs T33153): Add missing props for multiselect (#290)
Browse files Browse the repository at this point in the history
* bug(refs T33153): Add props for groups to multiselect

- Add missing props to wrapper component for vue-multiselect
- Add undefined as default for customlabel, because otherwise we get an empty label if the parent doesn't give one.
  • Loading branch information
gruenbergerdemos authored and graupnerdemos committed Jun 13, 2023
1 parent c800e98 commit 591648d
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- ([#269](https://github.com/demos-europe/demosplan-ui/pull/269)) DpIcon: new selector `landscape`, `portrait`, or `square`, based on icon proportions ([@spiess-demos](https://github.com/spiess-demos))
- ([#270](https://github.com/demos-europe/demosplan-ui/pull/270)) DpIcon: new icons (ai, copy) ([@spiess-demos](https://github.com/spiess-demos))

### Fixed
- ([#290](https://github.com/demos-europe/demosplan-ui/pull/290)) Add missing props to DpMultiselect ([@gruenbergerdemos](https://github.com/gruenbergerdemos))

## v0.1.3 - 2032-05-31

### Removed
Expand Down
112 changes: 98 additions & 14 deletions src/components/DpMultiselect/DpMultiselect.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<template>
<div>
<vue-multiselect
:close-on-select="closeOnSelect"
:deselect-group-label="deselectGroupLabel"
:deselect-label="deselectLabel"
:label="label"
:multiple="multiple"
:options="options"
:placeholder="Translator.trans('choose')"
:searchable="searchable"
:select-group-label="selectGroupLabel"
:select-label="selectLabel"
:selected-label="selectedLabel"
:tag-placeholder="Translator.trans('tag.create')"
:track-by="trackBy"
:value="value"
v-bind="{
closeOnSelect,
customLabel,
dataCy,
deselectGroupLabel,
deselectLabel,
disabled,
groupLabel,
groupSelect,
groupValues,
id,
label,
loading,
maxHeight,
multiple,
name,
options,
placeholder,
searchable,
selectGroupLabel,
selectLabel,
selectedLabel,
tagPlaceholder,
trackBy,
value
}"
v-dp-validate-multiselect="required"
@close="newVal => $emit('close', newVal)"
@input="newVal => $emit('input', newVal)"
Expand Down Expand Up @@ -87,6 +99,18 @@ export default {
default: true
},
customLabel: {
type: Function,
required: false,
default: undefined
},
dataCy: {
type: String,
required: false,
default: 'multiselect'
},
deselectLabel: {
type: String,
required: false,
Expand All @@ -99,23 +123,77 @@ export default {
default: ''
},
disabled: {
type: Boolean,
required: false,
default: false
},
groupLabel: {
type: String,
required: false,
default: ''
},
groupSelect: {
type: Boolean,
required: false,
default: false
},
groupValues: {
type: String,
required: false,
default: ''
},
id: {
type: String,
required: false,
default: ''
},
label: {
type: String,
required: false,
default: ''
},
loading: {
type: Boolean,
required: false,
default: false
},
maxHeight: {
type: Number,
required: false,
default: 300
},
multiple: {
required: false,
type: Boolean,
default: false
},
name: {
type: String,
required: false,
default: ''
},
options: {
type: Array,
required: true
},
placeholder: {
type: String,
required: false,
default: () => Translator.trans('choose')
},
required: {
required: false,
type: Boolean,
Expand Down Expand Up @@ -152,6 +230,12 @@ export default {
default: ''
},
tagPlaceholder: {
type: String,
required: false,
default: () => Translator.trans('tag.create')
},
trackBy: {
type: [String, null],
required: false,
Expand Down

0 comments on commit 591648d

Please sign in to comment.