fix(webui): "initial" Selector values are no longer uneditable

refactor/addresses-js
Tomáš Mládek 2023-11-18 14:11:58 +01:00
parent f5adb3fff8
commit 22747e2577
2 changed files with 23 additions and 1 deletions

View File

@ -107,7 +107,9 @@
export let initial: SelectorValue | undefined = undefined;
let inputValue = "";
$: {
$: setInitial(initial);
function setInitial(initial: SelectorValue | undefined) {
if (initial) {
switch (initial.t) {
case "Address":

View File

@ -28,6 +28,16 @@ export const Attribute: Story = {
},
};
export const AttributeInitial: Story = {
args: {
types: ["Attribute"],
initial: {
t: "Attribute",
name: "INITIAL_ATTR",
},
},
};
export const AllValues: Story = {
args: {
types: [
@ -59,6 +69,16 @@ export const Strings: Story = {
},
};
export const StringInitial: Story = {
args: {
types: ["String"],
initial: {
t: "String",
c: "An Initial String.",
},
},
};
export const Numbers: Story = {
args: {
types: ["Number"],