Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/collapse-implement
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlahti committed Sep 5, 2023
2 parents 7c02a20 + f8438a7 commit 101fff2
Show file tree
Hide file tree
Showing 5 changed files with 1,525 additions and 1,462 deletions.
12 changes: 6 additions & 6 deletions packages/sn-filter-pane/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@nebula.js/cli-build": "4.4.0",
"@nebula.js/cli-sense": "4.4.0",
"@nebula.js/cli-serve": "4.4.0",
"@rollup/plugin-typescript": "11.1.2",
"@rollup/plugin-typescript": "11.1.3",
"@scriptappy/cli": "0.10.0",
"@scriptappy/from-jsdoc": "0.19.0",
"@testing-library/react": "14.0.0",
Expand All @@ -69,27 +69,27 @@
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"babel-eslint": "^10.1.0",
"eslint": "8.47.0",
"eslint": "8.48.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-mocha": "10.1.0",
"eslint-plugin-only-warn": "1.1.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"jest": "^29.2.2",
"jest-environment-jsdom": "29.6.2",
"jest-environment-jsdom": "29.6.4",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-resizable": "3.0.5",
"sass": "^1.62.0",
"typescript": "5.1.6"
"typescript": "5.2.2"
},
"peerDependencies": {
"@nebula.js/stardust": ">=4.4.0"
},
"dependencies": {
"@mui/icons-material": "5.14.3",
"@mui/material": "5.14.5",
"@mui/icons-material": "5.14.7",
"@mui/material": "5.14.7",
"extend": "^3.0.2",
"lodash": "4.17.21",
"uuid": "^9.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ export default function useHandleResize({
if (!resources?.length) {
return;
}
resources.forEach((r: IListboxResource) => {
// eslint-disable-next-line no-param-reassign
const layoutOptions = r.layout.layoutOptions || {};
// eslint-disable-next-line no-param-reassign
layoutOptions.collapseMode = 'never';
r.layout.layoutOptions = layoutOptions;
});
// resources.forEach((r: IListboxResource, i) => {
// // eslint-disable-next-line no-param-reassign
// const layoutOptions = r.layout.layoutOptions || {};
// // eslint-disable-next-line no-param-reassign
// if (i === i) {
// layoutOptions.collapseMode = 'always';
// r.layout.layoutOptions = layoutOptions;
// }
// });
const { width, height } = getWidthHeight(gridRef);
const size: ISize = { width, height, dimensionCount: resources.length };
store.setState({ ...store.getState(), containerSize: size });
Expand All @@ -63,9 +65,8 @@ export default function useHandleResize({
const calculatedColumns = calculateColumns(size, [], isSmallDevice, expandProps, resources);
console.log('calculatedColumns', calculatedColumns);

Check warning on line 66 in packages/sn-filter-pane/src/components/ListboxGrid/use-handle-resize.ts

View workflow job for this annotation

GitHub Actions / build (sn-filter-pane) / Build

Unexpected console statement
const balancedColumns = balanceColumns(size, calculatedColumns, isSmallDevice, expandProps);
console.log('balancedColumns', balancedColumns);
const resourcesWithDefaultValues = setDefaultValues(resources);
const { columns: mergedColumnsAndResources, overflowing } = assignListboxesToColumns(balancedColumns, resourcesWithDefaultValues);
const { columns: mergedColumnsAndResources, overflowing } = assignListboxesToColumns(balancedColumns, resourcesWithDefaultValues, isSmallDevice);
setOverflowingResources(overflowing);
const { columns: expandedAndCollapsedColumns, expandedItemsCount } = calculateExpandPriority(mergedColumnsAndResources, size, expandProps, isSmallDevice);
setColumns(expandedAndCollapsedColumns);
Expand Down
Loading

0 comments on commit 101fff2

Please sign in to comment.