Skip to content

Commit

Permalink
UIPQB-164: Columns are reset when user modifies query
Browse files Browse the repository at this point in the history
  • Loading branch information
UladzislauKutarkin committed Dec 24, 2024
1 parent f97fb60 commit 755fd0d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [UIPQB-141](https://folio-org.atlassian.net/browse/UIPQB-141) Modal dialog focus inconsistencies across screenreaders.
* [UIPQB-162](https://folio-org.atlassian.net/browse/UIPQB-162) Errors when query includes a modified custom field.
* [UIPQB-175](https://folio-org.atlassian.net/browse/UIPQB-175) Displays the "Smth went wrong" page, when the user clicks on "Select operator" dropdown and selects any of them, if there are deleted custom fields.
* [UIPQB-164](https://folio-org.atlassian.net/browse/UIPQB-164) Columns are reset when user modifies query.


## [1.2.6](https://github.com/folio-org/ui-plugin-query-builder/tree/v1.2.6) (2024-12-11)
Expand Down
1 change: 1 addition & 0 deletions src/QueryBuilder/ResultViewer/ResultViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const ResultViewer = ({
onPreviewShown,
defaultLimit,
forcedVisibleValues,
visibleColumns

Check failure on line 85 in src/QueryBuilder/ResultViewer/ResultViewer.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Missing trailing comma
});

// refresh functionality
Expand Down
7 changes: 6 additions & 1 deletion src/hooks/useViewerCallbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ export const useViewerCallbacks = ({
currentRecordsCount,
onPreviewShown,
defaultLimit,
visibleColumns

Check failure on line 11 in src/hooks/useViewerCallbacks.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Expected indentation of 2 spaces but found 37

Check failure on line 11 in src/hooks/useViewerCallbacks.js

View workflow job for this annotation

GitHub Actions / ui / Install and lint / Install and lint

Missing trailing comma
}) => {
useEffect(() => {
if (defaultColumns.length !== 0) {
onSetDefaultColumns?.(defaultColumns);

onSetDefaultVisibleColumns?.(defaultVisibleColumns);
const uniqueVisibleColumns = Array.from(
new Set([...defaultVisibleColumns, ...visibleColumns])
);

onSetDefaultVisibleColumns?.(uniqueVisibleColumns);
}
}, [currentRecordsCount]);

Expand Down

0 comments on commit 755fd0d

Please sign in to comment.