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

bug(refs T33153): Add missing props for multiselect #290

Merged
merged 9 commits into from
Jun 13, 2023
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')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker right now (it is merged anyways) but didn't we want to drop Translator in demosplan-ui?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we still have no concept how to handle things like that. so unfortunately we have to do it this way until we have a technical solution

},

trackBy: {
type: [String, null],
required: false,
Expand Down