Allow team maintainer to edit, save, or delete queries if they are the author (#2236)

This commit is contained in:
gillespi314
2021-09-29 15:01:30 -05:00
committed by GitHub
parent 1b2b926380
commit 746d02ebe0
8 changed files with 163 additions and 103 deletions
@@ -57,6 +57,7 @@ interface ITableContainerProps {
secondarySelectActions?: IActionButtonProps[]; // TODO create table actions interface
customControl?: () => JSX.Element;
onSelectSingleRow?: (value: Row) => void;
getCustomCount?: (data: any) => number;
}
const baseClass = "table-container";
@@ -99,6 +100,7 @@ const TableContainer = ({
secondarySelectActions,
customControl,
onSelectSingleRow,
getCustomCount,
}: ITableContainerProps): JSX.Element => {
const [searchQuery, setSearchQuery] = useState("");
const [sortHeader, setSortHeader] = useState(defaultSortHeader || "");
@@ -212,7 +214,7 @@ const TableContainer = ({
resultsTitle,
pageIndex,
pageSize,
data.length
getCustomCount ? getCustomCount(data) : data.length
)}
</p>
) : (