Commit 2a196e91 authored by Joel's avatar Joel

feat: default set var name

parent 7a035882
...@@ -30,6 +30,8 @@ const VarList: FC<Props> = ({ ...@@ -30,6 +30,8 @@ const VarList: FC<Props> = ({
return (value: ValueSelector) => { return (value: ValueSelector) => {
const newList = produce(list, (draft) => { const newList = produce(list, (draft) => {
draft[index].value_selector = value draft[index].value_selector = value
if (!draft[index].variable)
draft[index].variable = value[value.length - 1]
}) })
onChange(newList) onChange(newList)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment