expand block when header is clicked
This commit is contained in:
parent
0d32ab77ae
commit
7ed273e158
|
@ -97,6 +97,7 @@
|
||||||
class:typing={typing && !automationNameError}
|
class:typing={typing && !automationNameError}
|
||||||
class:typing-error={automationNameError}
|
class:typing-error={automationNameError}
|
||||||
class="blockSection"
|
class="blockSection"
|
||||||
|
on:click={() => dispatch("toggle")}
|
||||||
>
|
>
|
||||||
<div class="splitHeader">
|
<div class="splitHeader">
|
||||||
<div class="center-items">
|
<div class="center-items">
|
||||||
|
@ -138,7 +139,20 @@
|
||||||
on:input={e => {
|
on:input={e => {
|
||||||
automationName = e.target.value.trim()
|
automationName = e.target.value.trim()
|
||||||
}}
|
}}
|
||||||
on:click={startTyping}
|
on:click={e => {
|
||||||
|
e.stopPropagation()
|
||||||
|
startTyping()
|
||||||
|
}}
|
||||||
|
on:keydown={async e => {
|
||||||
|
if (e.key === "Enter") {
|
||||||
|
typing = false
|
||||||
|
if (automationNameError) {
|
||||||
|
automationName = stepNames[block.id] || block?.name
|
||||||
|
} else {
|
||||||
|
await saveName()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}}
|
||||||
on:blur={async () => {
|
on:blur={async () => {
|
||||||
typing = false
|
typing = false
|
||||||
if (automationNameError) {
|
if (automationNameError) {
|
||||||
|
|
Loading…
Reference in New Issue