scenario vars can't have spaces

This commit is contained in:
Kyle Corbitt
2023-07-05 13:54:02 -07:00
parent 552199da4a
commit 63f6b646dc

View File

@@ -38,7 +38,7 @@ export default function ScenarioHeader() {
<Stack flex={1} px={cellPadding.x} py={cellPadding.y}>
<HStack>
<Heading size="sm" fontWeight="bold" flex={1}>
Scenario Vars
Scenarios
</Heading>
{
<Button
@@ -71,6 +71,11 @@ export default function ScenarioHeader() {
e.preventDefault();
onAddVar();
}
// If the user types a space, replace it with an underscore
if (e.key === " ") {
e.preventDefault();
setNewVariable((v) => v + "_");
}
}}
/>
<Button