mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-23 08:00:45 +00:00
nit accept underscore for flow editor
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user