Skip to content

Commit

Permalink
nit accept underscore for flow editor
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Sep 10, 2024
1 parent a19db9a commit 9a08368
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/lib/components/IdEditorInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
export let value = initialId
export let buttonText = ''
export let btnClasses = '!p-1 !w-[34px] !ml-1'
export let acceptUnderScores = false
let error = ''
const dispatch = createEventDispatcher()
const regex = /^[a-zA-Z][a-zA-Z0-9]*$/
const regex = acceptUnderScores ? /^[a-zA-Z][a-zA-Z0-9_]*$/ : /^[a-zA-Z][a-zA-Z0-9]*$/
$: validateId(value, reservedIds)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
btnClasses="!ml-1"
label=""
initialId={id}
acceptUnderScores
reservedIds={dfs(flowStore?.value.modules ?? [], (x) => x.id)}
bind:value={newId}
on:save={(e) => {
Expand Down

0 comments on commit 9a08368

Please sign in to comment.