Handle SSE event for View and ViewField (#18218)
This PR implements a first working version of SSE for View and ViewField. We could improve the logic but we re-use the same actual codepath for refreshing the views of an object. This does not handle filters and sorts for now. # Demo https://github.com/user-attachments/assets/73367f3a-a5fc-4b06-a2e2-fad3b99deec7
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { metadataStoreState } from '@/metadata-store/states/metadataStoreState';
|
||||
import { MainContextStoreProviderEffect } from '@/context-store/components/MainContextStoreProviderEffect';
|
||||
import { metadataStoreState } from '@/metadata-store/states/metadataStoreState';
|
||||
import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';
|
||||
import { useLastVisitedView } from '@/navigation/hooks/useLastVisitedView';
|
||||
import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState';
|
||||
@@ -76,7 +76,7 @@ export const MainContextStoreProvider = () => {
|
||||
const shouldComputeContextStore =
|
||||
(isRecordIndexPage || isRecordShowPage || isSettingsPage) &&
|
||||
!showAuthModal &&
|
||||
viewsEntry.status === 'loaded';
|
||||
viewsEntry.status === 'up-to-date';
|
||||
|
||||
if (!shouldComputeContextStore) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user