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

refactor: for route state prefer events over v-model #3416

Conversation

schogges
Copy link
Contributor

@schogges schogges commented Jan 20, 2025

In #1966 a watcher has been added to sync boolean query search params. This watcher caused some issues in nested routes due to a race condition as described in #3409.

The reason for the watcher (from #1966)

Whilst I'd prefer not use two way binding models we have some components that we use that uses these as required values, such as KInputSwitch

Turns out that the components KSelect and KCheckBox now support the @change events. When used alongside the :model-value we have our getter and setter separated. This means that we can remove the additional watcher.

From #3409

  1. I had to keep the watcher with the booleans only for the case of KInputSwitch.

@schogges schogges requested a review from a team as a code owner January 20, 2025 11:22
@schogges schogges requested review from johncowen and removed request for a team January 20, 2025 11:22
Copy link

netlify bot commented Jan 20, 2025

Deploy Preview for kuma-gui ready!

Name Link
🔨 Latest commit b1b5d06
🔍 Latest deploy log https://app.netlify.com/sites/kuma-gui/deploys/6790f9ebadcdb50009d39526
😎 Deploy Preview https://deploy-preview-3416--kuma-gui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@johncowen johncowen left a comment

Choose a reason for hiding this comment

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

LGTM! I left one comment about point 5 in the docs, but I'm easy either way.

@schogges schogges merged commit fd4238e into kumahq:master Jan 22, 2025
17 checks passed
@schogges schogges deleted the refactor/x-input-switch/prefer_events_over_model branch January 22, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants