scenario vars can't have spaces
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user