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 Report][3.0.0] [V-Buttons-Toggle] Ref - Desync & Relative – Do Not Set Values #15207

Open
BlackYuzia opened this issue Jun 4, 2022 · 9 comments · May be fixed by #15215
Open

[Bug Report][3.0.0] [V-Buttons-Toggle] Ref - Desync & Relative – Do Not Set Values #15207

BlackYuzia opened this issue Jun 4, 2022 · 9 comments · May be fixed by #15215
Assignees
Labels
E: group Group composable T: bug Functionality that does not work as intended/expected upstream Problem with a third party library that we may have to work around

Comments

@BlackYuzia
Copy link

BlackYuzia commented Jun 4, 2022

Environment

Vuetify Version: 3.0.0-beta.3
Vue Version: 3.2.36
Browsers: Chrome 102.0.0.0
OS: Windows 10

Steps to reproduce

  1. Open page
  2. Go to /bug-001
  3. Try click buttons
  4. Profit! You find bugs...

Expected Behavior

reactive and ref both work for array select

Actual Behavior

reactive - didn't work
ref - partialy work, has bugs if you set any values by default

Reproduction Link

Fast reproduce link
Source

Example

image

@KaelWD
Copy link
Member

KaelWD commented Jun 5, 2022

ref: looks ok to me, all three buttons are active initially
reactive: expected, item groups don't modify the original array: https://vuejs.org/guide/essentials/reactivity-fundamentals.html#limitations-of-reactive

@KaelWD KaelWD added the S: needs reproduction The issue does not contain a valid reproduction label Jun 5, 2022
@BlackYuzia
Copy link
Author

BlackYuzia commented Jun 5, 2022

@KaelWD

Currently, this bug show on 100-500 ms and then work's fine.
If you disable javascript, you see this bug.

image
image

UPD: I don't sure, but maybe, reason of that bug is an SSR?

reactive: expected,

Okey, then that not a bug 👀

@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected E: group Group composable and removed S: needs reproduction The issue does not contain a valid reproduction S: triage labels Jun 5, 2022
@KaelWD KaelWD added this to the v3.0.0-beta milestone Jun 5, 2022
@KaelWD
Copy link
Member

KaelWD commented Jun 5, 2022

This is caused by the internal group model having a dependency on the items array, which is empty on the first render

v => {
if (v == null) return []
return getIds(items, wrapInArray(v))
},

@BlackYuzia
Copy link
Author

This is caused by the internal group model having a dependency on the items array, which is empty on the first render

Suppose, #15202 also have the same trouble?

@BlackYuzia
Copy link
Author

I set mode to private for my repo with sources, the same as before issues, if you require sources — call me.

@johnleider
Copy link
Member

How do I test this locally? Is it only present in NUXT? The repo links are 404 for me.

@BlackYuzia
Copy link
Author

BlackYuzia commented Jul 5, 2022

@johnleider you mean source or reproduction link?

UPD: I open repo (as public). But, a bit later ( a few days ) I will close it again

@KaelWD
Copy link
Member

KaelWD commented Jul 5, 2022

There is a playground in #15215

@KaelWD KaelWD self-assigned this Jul 6, 2022
@johnleider johnleider modified the milestones: v3.0.0-beta, v3.0.x Aug 17, 2022
@johnleider johnleider assigned johnleider and unassigned KaelWD Aug 17, 2022
@johnleider johnleider changed the title [Bug Report][3.0.0-beta.3] [V-Buttons-Toggle] Ref - Desync & Relative – Do Not Set Values [Bug Report][3.0.0] [V-Buttons-Toggle] Ref - Desync & Relative – Do Not Set Values Nov 17, 2022
@KaelWD KaelWD modified the milestones: v3.0.x, v3.1.x Jan 6, 2023
@johnleider johnleider added the upstream Problem with a third party library that we may have to work around label Mar 3, 2023
@KaelWD KaelWD modified the milestones: v3.1.x, v3.x.x Apr 5, 2023
@johnleider johnleider modified the milestones: v3.x.x, v3.2.0 (Orion) Apr 5, 2023
@tadvas

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E: group Group composable T: bug Functionality that does not work as intended/expected upstream Problem with a third party library that we may have to work around
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants