Merge pull request #1540 from riccardobl/inputdefault
add explicit support for default values in input fields
This commit is contained in:
commit
532abcb486
|
@ -38,7 +38,7 @@ export default function WalletSettings () {
|
||||||
// 'enabled' and 'priority' which are not defined in wallet.fields.
|
// 'enabled' and 'priority' which are not defined in wallet.fields.
|
||||||
return {
|
return {
|
||||||
...acc,
|
...acc,
|
||||||
[field.name]: wallet?.config?.[field.name] || ''
|
[field.name]: wallet?.config?.[field.name] || field.defaultValue || ''
|
||||||
}
|
}
|
||||||
}, wallet?.config)
|
}, wallet?.config)
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ export const fields = [
|
||||||
type: 'text',
|
type: 'text',
|
||||||
help: 'the blink wallet to use for sending (BTC or USD for stablesats)',
|
help: 'the blink wallet to use for sending (BTC or USD for stablesats)',
|
||||||
placeholder: 'BTC',
|
placeholder: 'BTC',
|
||||||
|
defaultValue: 'BTC',
|
||||||
clear: true,
|
clear: true,
|
||||||
autoComplete: 'off',
|
autoComplete: 'off',
|
||||||
clientOnly: true,
|
clientOnly: true,
|
||||||
|
@ -50,6 +51,7 @@ export const fields = [
|
||||||
label: 'receive wallet type',
|
label: 'receive wallet type',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
help: 'the blink wallet to use for receiving (only BTC available)',
|
help: 'the blink wallet to use for receiving (only BTC available)',
|
||||||
|
defaultValue: 'BTC',
|
||||||
clear: true,
|
clear: true,
|
||||||
autoComplete: 'off',
|
autoComplete: 'off',
|
||||||
placeholder: 'BTC',
|
placeholder: 'BTC',
|
||||||
|
|
Loading…
Reference in New Issue