-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
If these props are not given by the parent, we don't want to give them to vue-multiselect, because otherwise we get empty results
If these props are not given by the parent, we don't want to give them to vue-multiselect, because otherwise we get empty results
@@ -2,12 +2,22 @@ | |||
<div> | |||
<vue-multiselect | |||
:close-on-select="closeOnSelect" | |||
v-bind="conditionalProps" | |||
:data-cy="dataCy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would enhance readability + is a recognized pattern to move other prop definitions to v-bind, too. Something like...
:data-cy="dataCy" | |
v-bind="{ | |
...conditionalProps, | |
dataCy, | |
deselectGroupLabel, | |
deselectLabel, | |
disabled, | |
groupLabel, | |
//... | |
}" |
However idk if this adds to code quality at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it (and other team members seem to do, too). Done in 7d0f4b8
Undefined seems to do the trick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm + works!
tagPlaceholder: { | ||
type: String, | ||
required: false, | ||
default: () => Translator.trans('tag.create') |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
* 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.
Ticket: https://yaits.demos-deutschland.de/T33153
Add some missing props to wrapper component to pass to vue-multiselect.
custom-label
needs to haveundefined
as default, because otherwise we get an empty label if the parent didn't give one.