-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add warning banner for download table preview for entities with lots of vars #1673
Add warning banner for download table preview for entities with lots of vars #1673
Conversation
I think we want to avoid making the request if I would rename that variable to something like |
Hmm... maybe this would be a better place to add the check. |
Thanks @dmfalke ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once my comment is addressed, I think this is ready to go!
@@ -223,7 +229,7 @@ export default function SubsetDownloadModal({ | |||
>['serverSidePagination']['fetchPaginatedData'] = useCallback( | |||
({ pageSize, pageIndex, sortBy }) => { | |||
if (!currentEntity) return; | |||
if (selectedVariableDescriptors.length === 0) { | |||
if (selectedVariableDescriptors.length === 0 || !canLoadTablePreview) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
canLoadTablePreview
should probably be added to the list of dependencies for this callback function (
web-eda/src/lib/workspace/Subsetting/SubsetDownloadModal.tsx
Lines 280 to 287 in f606310
[ | |
selectedVariableDescriptors, | |
studyMetadata.id, | |
subsettingClient, | |
analysisState.analysis?.descriptor.subset.descriptor, | |
currentEntity, | |
mergeKeys, | |
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, because if this value changed we'd definitely want to stop/start fetching data. Thank you!
Resolves #1652
Current behavior
Now it looks like:
That error banner only comes up once i've clicked at least one var.
Is it weird to have both banners? I thought about removing the server-error banner, but i dont want to hide errors that might be useful to us to see later...