@1771technologies/lytenyte-pro 1.0.0-beta.34 → 1.0.0-beta.37

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.
@@ -2,8 +2,9 @@ import type { Column, Grid } from "../+types";
2
2
  import type { PathBranch } from "@1771technologies/lytenyte-shared";
3
3
  export interface UseColumnManagerProps<T> {
4
4
  readonly grid: Grid<T>;
5
+ readonly query?: string;
5
6
  }
6
- export declare function useColumnManager<T>({ grid }: UseColumnManagerProps<T>): {
7
+ export declare function useColumnManager<T>({ grid, query }: UseColumnManagerProps<T>): {
7
8
  items: (PathBranch<Column<T>> | import("@1771technologies/lytenyte-shared").PathLeaf<Column<T>>)[];
8
9
  lookup: Record<string, PathBranch<Column<any>>>;
9
10
  };
@@ -1,8 +1,13 @@
1
1
  import { useMemo } from "react";
2
2
  import { useTreeViewPaths } from "../tree-view/hooks/use-tree-view-paths";
3
- export function useColumnManager({ grid }) {
3
+ export function useColumnManager({ grid, query }) {
4
4
  const columns = grid.state.columns.useValue();
5
- const items = useTreeViewPaths(columns, true);
5
+ const filteredColumns = useMemo(() => {
6
+ if (!query)
7
+ return columns;
8
+ return columns.filter((c) => (c.name ?? c.id).toLowerCase().includes(query));
9
+ }, [columns, query]);
10
+ const items = useTreeViewPaths(filteredColumns, true);
6
11
  const branchLookup = useMemo(() => {
7
12
  const stack = [...items];
8
13
  const lookup = {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@1771technologies/lytenyte-pro",
3
3
  "description": "Blazingly fast headless React data grid with 100s of features.",
4
- "version": "1.0.0-beta.34",
4
+ "version": "1.0.0-beta.37",
5
5
  "type": "module",
6
6
  "license": "COMMERCIAL",
7
7
  "files": [
@@ -49,12 +49,12 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@1771technologies/atom": "^1.0.2",
52
- "@1771technologies/lytenyte-dom-utils": "1.0.0-beta.34",
53
- "@1771technologies/lytenyte-dragon": "1.0.0-beta.34",
54
- "@1771technologies/lytenyte-shared": "1.0.0-beta.34",
55
- "@1771technologies/lytenyte-js-utils": "1.0.0-beta.34",
56
- "@1771technologies/lytenyte-core": "1.0.0-beta.34",
57
- "@1771technologies/lytenyte-react-hooks": "1.0.0-beta.34"
52
+ "@1771technologies/lytenyte-core": "1.0.0-beta.37",
53
+ "@1771technologies/lytenyte-dragon": "1.0.0-beta.37",
54
+ "@1771technologies/lytenyte-shared": "1.0.0-beta.37",
55
+ "@1771technologies/lytenyte-js-utils": "1.0.0-beta.37",
56
+ "@1771technologies/lytenyte-dom-utils": "1.0.0-beta.37",
57
+ "@1771technologies/lytenyte-react-hooks": "1.0.0-beta.37"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": "^18.0.0 || ^19.0.0",