Skip to content

Commit 5bef71e

Browse files
Merge pull request #161 from zhuje/ou872-modal-pr-2
OU-872: [Part 2] Use modal id when using the modal from the dynamic plugin SDK
2 parents adae045 + 5fcd7c5 commit 5bef71e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ start-console:
3131

3232
.PHONY: lint-frontend
3333
lint-frontend:
34-
cd web && npm run lint
34+
cd web && npm run lint && npm run lint:tsc
3535

3636
.PHONY: install-backend
3737
install-backend:

web/src/components/Chooser.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ export const Chooser: React.FC<ChooserProps> = ({ selectedID, items, onChange })
1313
{items.map(({ label, id, tooltip }) => {
1414
let item = (
1515
<ToggleGroupItem
16+
key={`chooser-togglegroupitem-${id}`}
1617
text={label}
1718
isSelected={selectedID === id}
1819
onChange={(_, on) => on && onChange && onChange(id)}
1920
/>
2021
);
21-
if (tooltip) item = <Tooltip content={tooltip}>{item}</Tooltip>;
22+
if (tooltip)
23+
item = (
24+
<Tooltip key={`chooser-tooltip-${id}`} content={tooltip}>
25+
{item}
26+
</Tooltip>
27+
);
2228
return item;
2329
})}
2430
</ToggleGroup>

0 commit comments

Comments
 (0)