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.7.1] [VDataTable] update:currentItems event is not emitted on the first render #20440

Open
vmihailenco opened this issue Sep 8, 2024 · 1 comment · May be fixed by #20449
Open

Comments

@vmihailenco
Copy link

vmihailenco commented Sep 8, 2024

Environment

Vuetify Version: 3.7.1
Last working version: 2.7.2
Vue Version: 3.5.3
Browsers: Chrome 128.0.0.0
OS: Linux x86_64

Steps to reproduce

  1. Run the example.
  2. There is no console.log until the pagination changes.

Expected Behavior

update:currentItems is emitted on component mount. Probably adding immediate: true to the watch is all that is needed. It used to work in Vuetify 2.

Actual Behavior

The initial update:currentItems event is not emitted until the data or pagination changes. It makes retrieving initial currentItems tricky.

Reproduction Link

https://play.vuetifyjs.com/#...

@TIM56887
Copy link
Contributor

TIM56887 commented Sep 9, 2024

I think it will cause render twice in SSR.

@J-Sek J-Sek linked a pull request Sep 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants