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.3.19] VDataTable always shows loading text when loading prop is set #18445

Closed
mathiasstamm opened this issue Oct 11, 2023 · 6 comments · Fixed by #18810
Closed
Assignees
Labels
C: VDataTable S: triage T: regression Something that used to work but we broke
Milestone

Comments

@mathiasstamm
Copy link

Environment

Vuetify Version: 3.3.19
Last working version: 3.3.18
Vue Version: 3.3.4
Browsers: Chrome 117.0.0.0
OS: Windows 10

Steps to reproduce

Click on the "TOGGLE LOADING PROP" button and compare the results between vuetify version 3.3.18 and 3.3.19.

Expected Behavior

Table rows remain visible while loading, just grayed out.

Actual Behavior

Table rows always disappear, default loading text is shown.

Reproduction Link

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

Other comments

deb7683

I belive that this commit introduced the change which always hides the table rows. If the loading prop is set, the rows are always replaced. There should be an extra flag which allows the actual rows to remain visible, or something similar.

@mathiasstamm mathiasstamm changed the title [Bug Report][3.3.19] VDataTable always shows loading text [Bug Report][3.3.19] VDataTable always shows loading text when loading prop is set Oct 11, 2023
@diaeai
Copy link

diaeai commented Oct 16, 2023

+1

@hendrikbl
Copy link

Just upgraded from vuetify 3.3.16 to 3.4.0 and this behaviour still exists. In 3.3.16 labs version it was working as expected.

@dm4t2
Copy link

dm4t2 commented Nov 10, 2023

+1

Always replacing the rows causes page jumps and feels very disturbing.
It would be better to display the rows unless the loading-text prop is set.

@gduliscouet-ubitransport

I had the same issue when upgrading. @nekosaur this functional change of the loading came with this commit to handle the loading-text prop. Was it expected ? What do you think about @dm4t2 proposition ? Would it work to check for props.loading && (slots.loading || props.loadingText) ?

image

@BenShelton
Copy link

BenShelton commented Nov 22, 2023

The documentation is also inconsistent with this behaviour, for example the loading slot states at https://vuetifyjs.com/en/api/v-data-table/#slots-loading:

Defines content for when loading is true and no items are provided.

Other documentation talking about the loading prop says similar things, the loading text is not shown if there are items.

To line up with that there'd also need to be a check in the render function mentioned above that there aren't any items first before showing the loading slot or loading text.

if (props.loading && !props.items.length && (slots.loading || props.loadingText)) {

@abdu-udwz
Copy link

abdu-udwz commented Nov 30, 2023

Additional gifs to further clarify the expected behavior. A comparison between the old Vuetify 2 and the current behavior.

In Vuetify 2 docs the example:

opengl-rotating-triangle

In the latest version of Vuetify 3 docs example:

opengl-rotating-triangle

Currently, I work around this by wrapping my table in a VCard and relying on it for loading state. It is somehow better than having layout shifts

@johnleider johnleider added this to the v3.4.x milestone Dec 1, 2023
@johnleider johnleider added T: regression Something that used to work but we broke C: VDataTable and removed S: triage labels Dec 1, 2023
nekosaur added a commit that referenced this issue Dec 1, 2023

Verified

This commit was signed with the committer’s verified signature.
jbedard Jason Bedard
closes #18445
@johnleider johnleider assigned nekosaur and unassigned johnleider and KaelWD Dec 1, 2023
johnleider added a commit that referenced this issue Dec 5, 2023
closes #18445

Co-authored-by: John Leider <john@vuetifyjs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VDataTable S: triage T: regression Something that used to work but we broke
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants