-
Notifications
You must be signed in to change notification settings - Fork 9
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: fields required in all groups and nodes requests #1515
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,9 @@ export function StorageGroupPage() { | |
const shouldUseGroupsHandler = useStorageGroupsHandlerAvailable(); | ||
const capabilitiesLoaded = useCapabilitiesLoaded(); | ||
const groupQuery = storageApi.useGetStorageGroupsInfoQuery( | ||
valueIsDefined(groupId) ? {groupId, shouldUseGroupsHandler, with: 'all'} : skipToken, | ||
valueIsDefined(groupId) | ||
? {groupId, shouldUseGroupsHandler, with: 'all', fieldsRequired: 'all'} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only 1 group is requested here and we need all its data |
||
: skipToken, | ||
{ | ||
pollingInterval: autoRefreshInterval, | ||
skip: !capabilitiesLoaded, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ export function getRequiredDataFields<ColumnId extends string, RequiredField ext | |
return fields; | ||
}, new Set<RequiredField>()); | ||
|
||
return Array.from(requiredFieldsSet); | ||
return Array.from(requiredFieldsSet).sort(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sort to ensure no additional requests when order changes. Example: Although it's the same data, it will be requested twice, because of different state keys ( |
||
} |
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.
It's possible to request data based on columns for not paginated storage. However, there is a problem: when you update columns, needed data fields are updated and data reloaded. For paginated table it isn't the issue, because it loads only 50 entities, but for not paginated tables requests take to long to load, so we need to avoid data reloads if possible.
I expect, that soon enough we will fix all issues with
PaginatedTable
and could get rid ofDataTable
inStorage