fixed up service editor

This commit is contained in:
ari committed 2022-06-17 14:23:15 -04:00
1 parent 029df7932e
commit 5bef962977
8 files changed
+107 -44

No files matched your search

+15 -20
View File
@@ -36,34 +36,29 @@ export const SearchItem: FC<{
searchTerm: string;
onlyShowLabel?: boolean;
}> = ({ listProps, label, id, searchTerm, onlyShowLabel = false }) => {
const labelElm = (
<b className="input-extras--search-item--list--label">
<HighlightElm text={label} searchTerm={searchTerm} />
</b>
);
const idElm = (
<small className="input-extras--search-item--list--id">
<HighlightElm text={id} searchTerm={searchTerm} />
</small>
);
let inner = (
<>
<b>
<HighlightElm text={prettyName(label)} searchTerm={searchTerm} />
</b>{" "}
<small>
<HighlightElm text={id} searchTerm={searchTerm} />
</small>
{labelElm}
{idElm}
</>
);
if (onlyShowLabel) {
if (label) {
inner = (
<>
<b>
<HighlightElm text={prettyName(label)} searchTerm={searchTerm} />
</b>{" "}
</>
);
inner = labelElm;
} else {
inner = (
<>
<small>
<HighlightElm text={id} searchTerm={searchTerm} />
</small>
</>
);
inner = idElm;
}
}