@trackunit/react-table 0.0.389 → 0.0.391

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js CHANGED
@@ -617,8 +617,8 @@ const useTable = (_a) => {
617
617
  }, [isFirstRender, columns]);
618
618
  React.useEffect(() => {
619
619
  if (initialState && sharedUtils.objectKeys(initialState || {}).length > 0) {
620
- setColumnVisibility(sharedUtils.objectKeys(initialState.columnVisibility || {}).length > 0 ? updatedInitialColumnVisibility : {});
621
- setColumnOrder(updatedInitialColumnOrder || []);
620
+ setColumnVisibility(initialState.columnVisibility || updatedInitialColumnVisibility || {});
621
+ setColumnOrder(initialState.columnOrder || updatedInitialColumnOrder || []);
622
622
  setSorting(initialState.sorting || []);
623
623
  setColumnSizing(initialState.columnSizing || {});
624
624
  }
@@ -659,10 +659,9 @@ const useTable = (_a) => {
659
659
  onTableStateChange(state);
660
660
  }
661
661
  }, [onTableStateChange, state]);
662
- const memoizedTable = React.useMemo(() => {
662
+ return React.useMemo(() => {
663
663
  return { table };
664
664
  }, [table]);
665
- return memoizedTable;
666
665
  };
667
666
 
668
667
  /**
package/index.esm.js CHANGED
@@ -592,8 +592,8 @@ const useTable = (_a) => {
592
592
  }, [isFirstRender, columns]);
593
593
  useEffect(() => {
594
594
  if (initialState && objectKeys(initialState || {}).length > 0) {
595
- setColumnVisibility(objectKeys(initialState.columnVisibility || {}).length > 0 ? updatedInitialColumnVisibility : {});
596
- setColumnOrder(updatedInitialColumnOrder || []);
595
+ setColumnVisibility(initialState.columnVisibility || updatedInitialColumnVisibility || {});
596
+ setColumnOrder(initialState.columnOrder || updatedInitialColumnOrder || []);
597
597
  setSorting(initialState.sorting || []);
598
598
  setColumnSizing(initialState.columnSizing || {});
599
599
  }
@@ -634,10 +634,9 @@ const useTable = (_a) => {
634
634
  onTableStateChange(state);
635
635
  }
636
636
  }, [onTableStateChange, state]);
637
- const memoizedTable = useMemo(() => {
637
+ return useMemo(() => {
638
638
  return { table };
639
639
  }, [table]);
640
- return memoizedTable;
641
640
  };
642
641
 
643
642
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table",
3
- "version": "0.0.389",
3
+ "version": "0.0.391",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {