Skip to content

Commit

Permalink
fix: refresh problems, display old values
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Mar 27, 2024
1 parent 3580df5 commit 970f56a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions src/filters/liquid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default function(editor: DataSourceEditor): Filter[] {
quotedOptions: ['separator'],
optionsForm: (field: Field | null, options: Options) => html`
<label>Separator
<input type="text" name="separator" placeholder="Separator" value=${options.separator}/>
<input type="text" name="separator" placeholder="Separator" .value=${options.separator}/>
</label>
`,
}, {
Expand Down Expand Up @@ -291,7 +291,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Index
<input type="number" name="index" placeholder="Index" value=${options.index}/>
<input type="number" name="index" placeholder="Index" .value=${options.index}/>
</label>
`,
}, {
Expand Down Expand Up @@ -372,7 +372,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Value
<input type="number" name="value" placeholder="Value" value=${options.value}/>
<input type="number" name="value" placeholder="Value" .value=${options.value}/>
</label>
`,
}, {
Expand All @@ -387,7 +387,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Value
<input type="number" name="value" placeholder="Value" value=${options.value}/>
<input type="number" name="value" placeholder="Value" .value=${options.value}/>
</label>
`,
}, {
Expand All @@ -402,7 +402,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Value
<input type="number" name="value" placeholder="Value" value=${options.value}/>
<input type="number" name="value" placeholder="Value" .value=${options.value}/>
</label>
`,
}, {
Expand All @@ -417,7 +417,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Value
<input type="number" name="value" placeholder="Value" value=${options.value}/>
<input type="number" name="value" placeholder="Value" .value=${options.value}/>
</label>
`,
}, {
Expand All @@ -434,7 +434,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Value
<input type="number" name="value" placeholder="Value" value=${options.value}/>
<input type="number" name="value" placeholder="Value" .value=${options.value}/>
</label>
`,
}, {
Expand Down Expand Up @@ -481,7 +481,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Value
<input type="number" name="value" placeholder="Value" value=${options.value}/>
<input type="number" name="value" placeholder="Value" .value=${options.value}/>
</label>
`,
}, {
Expand All @@ -496,7 +496,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Value
<input type="number" name="value" placeholder="Value" value=${options.value}/>
<input type="number" name="value" placeholder="Value" .value=${options.value}/>
</label>
`,
}, {
Expand Down Expand Up @@ -573,7 +573,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Length
<input type="number" name="length" placeholder="Length" value=${options.length}/>
<input type="number" name="length" placeholder="Length" .value=${options.length}/>
</label>
`,
}, {
Expand All @@ -588,7 +588,7 @@ export default function(editor: DataSourceEditor): Filter[] {
},
optionsForm: (field: Field | null, options: Options) => html`
<label>Length
<input type="number" name="length" placeholder="Length" value=${options.length}/>
<input type="number" name="length" placeholder="Length" .value=${options.length}/>
</label>
`,
},
Expand Down
2 changes: 1 addition & 1 deletion src/model/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export function optionsToOptionsForm(arr: { name: string, value: unknown }[]): (
return html`
${arr.map((obj) => {
const value = options[obj.name] ?? obj.value ?? ''
return html`<label>${obj.name}</label><input type="text" name=${obj.name} value=${value}>`
return html`<label>${obj.name}</label><input type="text" name=${obj.name} .value=${value}>`
})
}
`
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function getFixedToken(value: string): Token {
},
optionsForm: () => html`
<label>Value
<input type="text" name="value" value=${value}>
<input type="text" name="value" .value=${value}>
</label>
`,
}
Expand Down
2 changes: 1 addition & 1 deletion src/view/state-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class StateEditor extends LitElement {
type="text"
class="ds-expression-input__fixed"
placeholder="Enter a text or switch to expression mode"
value=${text}
.value=${text}
/>
</div>
${ _currentValue && _currentValue.length > 0 ? html`
Expand Down

0 comments on commit 970f56a

Please sign in to comment.