pull/2196/head
Richard Harris 7 years ago
parent 87b6e17947
commit 21b063840d

@ -162,9 +162,8 @@
editor.on('change', instance => {
if (!updating_externally) {
updating_externally = true;
// code = instance.getValue();
dispatch('change', { value: instance.getValue() });
const value = instance.getValue();
dispatch('change', { value });
}
});

@ -28,6 +28,9 @@
if (match && match[2]) $selected.type = match[2];
editing = null;
// re-select, in case the type changed
handle_select($selected);
components = components; // TODO necessary?
}
@ -43,7 +46,7 @@
console.error(`Could not find component! That's... odd`);
}
selected.set($components[index] || $components[$components.length - 1]);
handle_select($components[index] || $components[$components.length - 1]);
}
}
@ -70,7 +73,7 @@
});
components.update(components => components.concat(component));
selected.set(component);
handle_select(component);
}
</script>
@ -193,7 +196,7 @@
spellcheck={false}
bind:value={editing.name}
on:focus={selectInput}
on:blur="{() => closeEdit()}"
on:blur={closeEdit}
use:enter="{e => e.target.blur()}"
>
{:else}

Loading…
Cancel
Save