mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fixed regression - broken select tag, because of Svelte upgrade
This commit is contained in:
parent
97215e31e9
commit
99876e3158
@ -10,6 +10,7 @@
|
|||||||
export let isNative = false;
|
export let isNative = false;
|
||||||
export let isMulti = false;
|
export let isMulti = false;
|
||||||
export let notSelected = null;
|
export let notSelected = null;
|
||||||
|
export let defaultValue = '';
|
||||||
|
|
||||||
let listOpen = false;
|
let listOpen = false;
|
||||||
let isFocused = false;
|
let isFocused = false;
|
||||||
@ -21,18 +22,19 @@
|
|||||||
|
|
||||||
{#if isNative}
|
{#if isNative}
|
||||||
<select
|
<select
|
||||||
|
value={value || defaultValue}
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:change={e => {
|
on:change={e => {
|
||||||
dispatch('change', e.target['value']);
|
dispatch('change', e.target['value']);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{#if notSelected}
|
{#if notSelected}
|
||||||
<option value="" selected={!value}>
|
<option value="">
|
||||||
{_.isString(notSelected) ? notSelected : '(not selected)'}
|
{_.isString(notSelected) ? notSelected : '(not selected)'}
|
||||||
</option>
|
</option>
|
||||||
{/if}
|
{/if}
|
||||||
{#each _.compact(options) as x (x.value)}
|
{#each _.compact(options) as x (x.value)}
|
||||||
<option value={x.value} selected={value == x.value}>
|
<option value={x.value}>
|
||||||
{x.label}
|
{x.label}
|
||||||
</option>
|
</option>
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
$: disabledFields = (currentAuthType ? currentAuthType.disabledFields : null) || [];
|
$: disabledFields = (currentAuthType ? currentAuthType.disabledFields : null) || [];
|
||||||
$: driver = $extensions.drivers.find(x => x.engine == engine);
|
$: driver = $extensions.drivers.find(x => x.engine == engine);
|
||||||
$: defaultDatabase = $values.defaultDatabase;
|
$: defaultDatabase = $values.defaultDatabase;
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<FormSelectField
|
<FormSelectField
|
||||||
@ -125,6 +124,7 @@
|
|||||||
label="Password mode"
|
label="Password mode"
|
||||||
isNative
|
isNative
|
||||||
name="passwordMode"
|
name="passwordMode"
|
||||||
|
defaultValue="saveEncrypted"
|
||||||
options={[
|
options={[
|
||||||
{ value: 'saveEncrypted', label: 'Save and encrypt' },
|
{ value: 'saveEncrypted', label: 'Save and encrypt' },
|
||||||
{ value: 'saveRaw', label: 'Save raw (UNSAFE!!)' },
|
{ value: 'saveRaw', label: 'Save raw (UNSAFE!!)' },
|
||||||
@ -154,5 +154,4 @@
|
|||||||
.radio :global(label) {
|
.radio :global(label) {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -43,4 +43,4 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<FormSelectFieldRaw {name} options={getOptions()} />
|
<FormSelectFieldRaw {name} options={getOptions()} isNative />
|
||||||
|
Loading…
Reference in New Issue
Block a user