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

[Vue] Make sure default value for modelValue in SiteSelector is reflected in v-model value. #19369

Merged
merged 3 commits into from Jun 21, 2022

Conversation

diosmosis
Copy link
Member

Description:

When null/undefined is used as the v-model value for SiteSelector, SiteSelector sets a default value. But this is not reflected in v-model since the update:modelValue event is not called, leaving the parent component's v-model value still set to undefined/null.

This PR makes sure the default value is set through update:modelValue.

It also adds a new property defaultToFirstSite that allows defaulting the modelValue to the first site in the queried lists. This can't be done by default in case it needs to be possible to unset the value to null. (I'm not sure if that's currently possible, though.)

Review

@diosmosis diosmosis added this to the 4.12.0 milestone Jun 18, 2022
peterhashair
peterhashair previously approved these changes Jun 19, 2022
@diosmosis diosmosis force-pushed the vue-matomo-site-default-v-model branch from 375424a to 74bf3fe Compare June 19, 2022 22:26
@sgiehl sgiehl merged commit 3fbdf87 into 4.x-dev Jun 21, 2022
@sgiehl sgiehl deleted the vue-matomo-site-default-v-model branch June 21, 2022 07:19
@justinvelluppillai justinvelluppillai added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants