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

fix: empty state should not appear during table loading #3040

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

a-kud
Copy link
Contributor

@a-kud a-kud commented Dec 17, 2023

Fixes #2969
Display an empty table directly instead of showing the empty state.

@charlesBochet
Copy link
Member

@a-kud Thank you :)
We still want to display the empty state when we have no row. However, this is different from the data being loaded.
I think you will need to introduce a new recoil state isRecordTableInitialLoadingState (similar as isFetchingRecordTableDataState which should actually be named isRecordTableFetchingMoreDataState)

Then, in RecordTableBodyEffect you should be able to compute it based on loading of useObjectRecordTable hook and then use it to not display the empty table

@a-kud a-kud force-pushed the 2969-no-empty-state-on-table-load branch from 62e78ac to fbd6684 Compare December 19, 2023 20:41
Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

Thank you! Works well, I have also removed unused code

@charlesBochet charlesBochet merged commit dd044e8 into twentyhq:main Dec 20, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty state should not appear during table loading
2 participants