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

[EuiTable] Default noItemsMessage should take loading property into account #5055

Closed
sorenlouv opened this issue Aug 19, 2021 · 3 comments
Closed

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Aug 19, 2021

Codesandbox: https://codesandbox.io/s/vrz4m

Problem
EuiBasicTable will show "No items found" when items=[] even if loading=true

Kapture 2021-08-19 at 20 32 42

This causes confusion to the user because they think there are no results. There is a loading indicator making this less of a problem but we are still sending slightly mixed signals

Workaround
The workaround is rather simple:

<EuiBasicTable
  noItemsMessage={
    isLoading
      ? 'Loading...'
      : 'No items found'
  }
  loading={isLoading}
  items={items}
/>

Kapture 2021-08-19 at 20 30 58

Better solution
It would be better if this was handled by default by EUI.

@sorenlouv sorenlouv changed the title [EuiTable] noItemsMessage [EuiTable] Default noItemsMessage should take loading property into account Aug 19, 2021
@elizabetdev
Copy link
Contributor

Thanks, @sqren, for suggesting a better solution.

As part of #5026, we will review all the tables' empty states and loading states. So I'll take your solution into consideration.

@github-actions
Copy link

👋 Hi there - this issue hasn't had any activity in 6 months. If the EUI team has not explicitly expressed that this is something on our roadmap, it's unlikely that we'll pick this issue up. We would sincerely appreciate a PR/community contribution if this is something that matters to you! If not, and there is no further activity on this issue for another 6 months (i.e. it's stale for over a year), the issue will be auto-closed.

Copy link

❌ Per our previous message, this issue is auto-closing after having been open and inactive for a year. If you strongly feel this is still a high-priority issue, or are interested in contributing, please leave a comment or open a new issue linking to this one for context.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants