spark modal title replace doc path with dash

This commit is contained in:
Bobby
2021-06-21 12:36:40 +10:00
parent 3a9c84f2ae
commit df740cbd54

View File

@@ -102,8 +102,15 @@ export default function SparksEditor({ requestSnackLog }) {
fullWidth
title={
<>
Edit {tableState?.tablePath} Sparks{" "}
<Chip label="ALPHA" size="small" />
Edit
{tableState?.tablePath
?.split("/")
.filter(function (_, i) {
// replace IDs with subTables that appears at even indexes
return i % 2 === 0;
})
.join("-")}
Sparks <Chip label="ALPHA" size="small" />
</>
}
children={