From 08313879050d20c385f704b707696c4b480cf6e2 Mon Sep 17 00:00:00 2001 From: Andy Chan Date: Fri, 19 Apr 2024 18:20:08 -0400 Subject: [PATCH] Implement UI of new row button Functionality is extremely janky. Does not work well. --- compass/components/Table/Index.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/compass/components/Table/Index.tsx b/compass/components/Table/Index.tsx index d27110f..5699fb1 100644 --- a/compass/components/Table/Index.tsx +++ b/compass/components/Table/Index.tsx @@ -16,7 +16,7 @@ import { ChangeEvent, useState, useEffect, FunctionComponent, useRef, ChangeEven import { RowOptionMenu } from "./RowOptionMenu"; import { RowOpenAction } from "./RowOpenAction"; import { TableAction } from "./TableAction"; -import { Bars2Icon, AtSymbolIcon, HashtagIcon, ArrowDownCircleIcon } from "@heroicons/react/24/solid"; +import { Bars2Icon, AtSymbolIcon, HashtagIcon, ArrowDownCircleIcon, PlusIcon } from "@heroicons/react/24/solid"; import { rankItem } from "@tanstack/match-sorter-utils"; import { TableCell } from "./TableCell"; import { PrimaryTableCell } from "./PrimaryTableCell"; @@ -100,6 +100,10 @@ export const Table = () => { const [data, setData] = useState([...usersExample]); + const addUser = () => { + setData([...data, {}]); + } + // Searching const [query, setQuery] = useState(""); const handleSearchChange = (e: ChangeEvent) => { @@ -195,7 +199,19 @@ export const Table = () => { ); })} + + + + + + + New + + + + ) } +