-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTableTreeWithoutSchema.tsx
More file actions
31 lines (30 loc) · 1.23 KB
/
TableTreeWithoutSchema.tsx
File metadata and controls
31 lines (30 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from "react";
import { LakehouseExplorerTablesTreeProps } from "src/models/LakehouseExplorerModel";
import { Table20Regular } from "@fluentui/react-icons";
import { TreeItem, TreeItemLayout, Tooltip } from "@fluentui/react-components";
export function TableTreeWithoutSchema(props: LakehouseExplorerTablesTreeProps) {
const {allTablesInLakehouse, onSelectTableCallback} = props;
return (
<>
{allTablesInLakehouse &&
allTablesInLakehouse.map((table) => (
<TreeItem
key={table.name}
accessKey={table.path}
itemType="leaf"
onClick={() => onSelectTableCallback(table)}
>
<Tooltip
relationship="label"
content={table.name}>
<TreeItemLayout
className={(table.isSelected ? "selected" : "")}
iconBefore={<Table20Regular />}>
{table.name}
</TreeItemLayout>
</Tooltip>
</TreeItem>
))}
</>
);
}