diff --git a/client/src/components/ui/data-table.tsx b/client/src/components/ui/data-table.tsx index 249a820..739cb9d 100644 --- a/client/src/components/ui/data-table.tsx +++ b/client/src/components/ui/data-table.tsx @@ -179,8 +179,8 @@ export function DataTable({ {table.getAllColumns() - .filter(column => column.getCanHide()) - .map(column => ( + .filter((column) => column.getCanHide()) + .map((column) => ( ({ ) : ( diff --git a/client/src/components/ui/tag-input.tsx b/client/src/components/ui/tag-input.tsx index 02ebb71..6d445ea 100644 --- a/client/src/components/ui/tag-input.tsx +++ b/client/src/components/ui/tag-input.tsx @@ -154,14 +154,15 @@ export const TagInput = forwardRef(({ const [filteredSuggestions, setFilteredSuggestions] = useState(suggestions); const inputRef = useRef(null); - // Forward the ref - const handleRef = (el: HTMLInputElement) => { + // Merge refs + const mergedRef = (el: HTMLInputElement | null) => { + // Update inner ref + if (el) inputRef.current = el; + + // Forward to external ref if (typeof ref === 'function') { ref(el); - } else if (ref) { - ref.current = el; } - inputRef.current = el; }; // Focus the input when clicking the container @@ -342,7 +343,7 @@ export const TagInput = forwardRef(({ {!readOnly && (
setInputValue(e.target.value)} diff --git a/package-lock.json b/package-lock.json index 761d623..f362552 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,6 +42,7 @@ "@radix-ui/react-tooltip": "^1.2.0", "@tailwindcss/vite": "^4.1.3", "@tanstack/react-query": "^5.60.5", + "@tanstack/react-table": "^8.21.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", @@ -3269,6 +3270,39 @@ "react": "^18 || ^19" } }, + "node_modules/@tanstack/react-table": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@tanstack/react-table/-/react-table-8.21.3.tgz", + "integrity": "sha512-5nNMTSETP4ykGegmVkhjcS8tTLW6Vl4axfEGQN3v0zdHYbK4UfoqfPChclTrJ4EoK9QynqAu9oUf8VEmrpZ5Ww==", + "license": "MIT", + "dependencies": { + "@tanstack/table-core": "8.21.3" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, + "node_modules/@tanstack/table-core": { + "version": "8.21.3", + "resolved": "https://registry.npmjs.org/@tanstack/table-core/-/table-core-8.21.3.tgz", + "integrity": "sha512-ldZXEhOBb8Is7xLs01fR3YEc3DERiz5silj8tnGkFZytt1abEvl/GhUmCE0PMLaMPTa3Jk4HbKmRlHmu+gCftg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", diff --git a/package.json b/package.json index bbb594a..4db17b3 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@radix-ui/react-tooltip": "^1.2.0", "@tailwindcss/vite": "^4.1.3", "@tanstack/react-query": "^5.60.5", + "@tanstack/react-table": "^8.21.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1",