schummar-table 0.46.7 → 0.46.8

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/dist/index.cjs CHANGED
@@ -3936,13 +3936,7 @@ var import_react28 = require("react");
3936
3936
  function filterColumns(state) {
3937
3937
  (0, import_react28.useEffect)(
3938
3938
  () => state.addReaction(
3939
- (state2) => [
3940
- state2.props.columns,
3941
- state2.hiddenColumns,
3942
- state2.columnOrder,
3943
- state2.displaySize,
3944
- state2.displaySizePx
3945
- ],
3939
+ (state2) => [state2.props.columns, state2.hiddenColumns, state2.columnOrder, state2.displaySize],
3946
3940
  ([columns, hiddenColumns, columnOrder, displaySize], draft) => {
3947
3941
  draft.activeColumns = orderBy(
3948
3942
  columns.filter((column) => {
@@ -4593,7 +4587,11 @@ function ColumnSelection() {
4593
4587
  const cssVariables = useCssVariables();
4594
4588
  const table = useTableContext();
4595
4589
  const reset = (0, import_react36.useContext)(TableResetContext);
4596
- const columns = table.useState((state) => state.props.columns);
4590
+ const columns = table.useState(
4591
+ (state) => state.props.columns.filter(
4592
+ (column) => state.displaySize === void 0 || column.displaySize === void 0 || column.displaySize.includes(state.displaySize)
4593
+ )
4594
+ );
4597
4595
  const hiddenColumns = table.useState((state) => state.hiddenColumns);
4598
4596
  const [anchorElement, setAnchorElement] = (0, import_react36.useState)(null);
4599
4597
  const toggle2 = (column, state) => {