nytai commented on a change in pull request #14823:
URL: https://github.com/apache/superset/pull/14823#discussion_r650287899
##########
File path: superset-frontend/src/views/CRUD/welcome/DashboardTable.tsx
##########
@@ -150,20 +149,19 @@ function DashboardTable({
name: 'Favorite',
label: t('Favorite'),
onClick: () => {
- getData('Favorite').then(() => {
- setDashboardFilter('Favorite');
- setInLocalStorage('dashboard', { tab: 'Favorite' });
- });
+ setDashboardFilter('Favorite');
+ setInLocalStorage(
+ HOMEPAGE_DASHBOARD_FILTER,
+ TableTabTypes.FAVORITE,
+ );
},
},
{
name: 'Mine',
label: t('Mine'),
onClick: () => {
- getData('Mine').then(() => {
- setDashboardFilter('Mine');
- setInLocalStorage('dashboard', { tab: 'Mine' });
- });
+ setDashboardFilter('Mine');
Review comment:
can the `TableTabTypes` enum be used here? Same on line 152?
##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -246,7 +252,8 @@ export default function ActivityTable({
);
},
);
- if (loadingState && !editedObjs) {
+
+ if ((loadingState && !editedObjs) || loadedCount < 3) {
Review comment:
These magic numbers are quite confusing. I'm assuming `loadedCount>=3`
means done fetching? Can't we just pass that in as a `doneFetching` flag?
##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -246,7 +252,8 @@ export default function ActivityTable({
);
},
);
- if (loadingState && !editedObjs) {
+
+ if ((loadingState && !editedObjs) || loadedCount < 3) {
Review comment:
Also, while we're in cleanup mode, is the eslint disable still needed on
line 263?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]