Skip to content

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

Merged
charlesBochet merged 4 commits intotwentyhq:mainfrom
a-kud:2969-no-empty-state-on-table-load
Dec 20, 2023
Merged

fix: empty state should not appear during table loading#3040
charlesBochet merged 4 commits intotwentyhq:mainfrom
a-kud:2969-no-empty-state-on-table-load

Conversation

@a-kud
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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