@dmsi/wedgekit-react 0.0.8 → 0.0.10

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.
@@ -3063,7 +3063,10 @@ function ColumnSelectorHeaderCell({
3063
3063
  children: "Reset to default"
3064
3064
  }
3065
3065
  ),
3066
- table.getAllColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3066
+ table.getAllColumns().filter((x) => {
3067
+ var _a;
3068
+ return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
3069
+ }).map((column) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
3067
3070
  ColumnSelectorMenuOption,
3068
3071
  {
3069
3072
  column,
@@ -709,7 +709,10 @@ function ColumnSelectorHeaderCell({
709
709
  children: "Reset to default"
710
710
  }
711
711
  ),
712
- table.getAllColumns().map((column) => /* @__PURE__ */ jsx(
712
+ table.getAllColumns().filter((x) => {
713
+ var _a;
714
+ return (_a = x.columnDef.meta) == null ? void 0 : _a.inVisibilityMenu;
715
+ }).map((column) => /* @__PURE__ */ jsx(
713
716
  ColumnSelectorMenuOption,
714
717
  {
715
718
  column,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dmsi/wedgekit-react",
3
3
  "private": false,
4
- "version": "0.0.8",
4
+ "version": "0.0.10",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "tsup",
@@ -863,13 +863,16 @@ function ColumnSelectorHeaderCell<T>({
863
863
  >
864
864
  Reset to default
865
865
  </Button>
866
- {table.getAllColumns().map((column) => (
867
- <ColumnSelectorMenuOption
868
- key={column.id}
869
- column={column}
870
- toggleColumnVisibility={toggleColumnVisibility}
871
- />
872
- ))}
866
+ {table
867
+ .getAllColumns()
868
+ .filter((x) => x.columnDef.meta?.inVisibilityMenu)
869
+ .map((column) => (
870
+ <ColumnSelectorMenuOption
871
+ key={column.id}
872
+ column={column}
873
+ toggleColumnVisibility={toggleColumnVisibility}
874
+ />
875
+ ))}
873
876
  </Menu>
874
877
  </DataGridCell>
875
878
  );
@@ -936,6 +939,7 @@ declare module "@tanstack/react-table" {
936
939
  checkbox?: boolean;
937
940
  headerWidth?: string;
938
941
  visible?: boolean;
942
+ inVisibilityMenu?: boolean;
939
943
  filterRowCell?: ({
940
944
  header,
941
945
  table,