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

Conversation

gruenbergerdemos
Copy link
Contributor

@gruenbergerdemos gruenbergerdemos commented Jun 12, 2023

Ticket: https://yaits.demos-deutschland.de/T33153

Add some missing props to wrapper component to pass to vue-multiselect. custom-label needs to have undefined as default, because otherwise we get an empty label if the parent didn't give one.

@gruenbergerdemos gruenbergerdemos self-assigned this Jun 12, 2023
@gruenbergerdemos gruenbergerdemos changed the title bug(refs T33153): Add props for groups to multiselect bug(refs T33153): Add missing props for multiselect Jun 12, 2023
@gruenbergerdemos gruenbergerdemos added bug Something isn't working review:frontend labels Jun 12, 2023
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
@gruenbergerdemos gruenbergerdemos marked this pull request as ready for review June 13, 2023 07:01
@@ -2,12 +2,22 @@
<div>
<vue-multiselect
:close-on-select="closeOnSelect"
v-bind="conditionalProps"
:data-cy="dataCy"
Copy link
Contributor

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...

Suggested change
:data-cy="dataCy"
v-bind="{
...conditionalProps,
dataCy,
deselectGroupLabel,
deselectLabel,
disabled,
groupLabel,
//...
}"

However idk if this adds to code quality at all.

Copy link
Contributor Author

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

Copy link
Contributor

@sakutademos sakutademos left a comment

Choose a reason for hiding this comment

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

lgtm + works!

@gruenbergerdemos gruenbergerdemos merged commit 50a8b96 into main Jun 13, 2023
@gruenbergerdemos gruenbergerdemos deleted the b_T33153_fix_multiselect branch June 13, 2023 08:40
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

graupnerdemos pushed a commit that referenced this pull request Jun 12, 2024
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working review:frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants