diff --git a/src/app/App.tsx b/src/app/App.tsx index 3401a223..1e0e03e6 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -4203,6 +4203,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
{brushList.map((brush, brushIndex) => { const label = getBrushLabel(brush, brushIndex); + const isSelected = selectedBrush?.id === brush.id; return (
- + {isSelected ? ( + setBrushNameDraft(event.currentTarget.value)} + onBlur={applyBrushNameChange} + onFocus={(event) => event.currentTarget.select()} + onKeyDown={(event) => + handleInlineNameInputKeyDown(event, () => { + setBrushNameDraft(selectedBrush?.name ?? ""); + }) + } + /> + ) : ( + + )}
- - {selectedBrush?.id !== brush.id ? null : ( - - )}
); })} @@ -4272,47 +4271,66 @@ export function App({ store, initialStatusMessage }: AppProps) {
No model instances placed yet.
) : (
- {modelInstanceDisplayList.map(({ modelInstance, label }) => ( -
-
- - + /> + ) : ( + + )} + +
-
- ))} + ); + })}
)} @@ -4324,47 +4342,65 @@ export function App({ store, initialStatusMessage }: AppProps) { {entityDisplayList.length === 0 ? null : (
- {entityDisplayList.map(({ entity, label }) => ( -
-
- - + /> + ) : ( + + )} + +
-
- ))} + ); + })} )}