-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: sumukhswamy <[email protected]>
- Loading branch information
1 parent
1f28351
commit dffcdc6
Showing
2 changed files
with
148 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
|
||
import React from "react"; | ||
import { | ||
EuiIcon, | ||
EuiTreeView | ||
} from "@elastic/eui"; | ||
import _ from 'lodash'; | ||
|
||
export const TableView =({tablenames}) =>{ | ||
let treeData; | ||
if(tablenames.length >0){ | ||
treeData = tablenames.map((element,index)=>({ | ||
label: element, | ||
icon: <EuiIcon type='tableDensityNormal' size="m" /> , | ||
id:'element_'+index | ||
})) | ||
} | ||
return ( | ||
<> | ||
{tablenames.length>0? | ||
<EuiTreeView | ||
aria-label = "Sample Folder Tree" | ||
items = {treeData} | ||
aria-labelledby="" | ||
/> | ||
:null} | ||
</> | ||
) | ||
|
||
} | ||
|