Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: selector input unwanted readonly #5354

Merged
merged 3 commits into from Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/shared/components/inputs/AssetAmountInput.svelte
Expand Up @@ -20,7 +20,7 @@
export let rawAmount: string = undefined
export let unit: string = undefined
export let containsSlider: boolean = false
export let disableAssetSelection: boolean = false
export let disableAssetSelection: boolean = null

let amount: string = rawAmount
? formatTokenAmountDefault(Number(rawAmount), asset?.metadata, unit, false)
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/components/inputs/NftInput.svelte
Expand Up @@ -7,7 +7,7 @@

export let nftId: string = ''
export let error: string = ''
export let readonly: boolean = false
export let readonly: boolean = null

let inputElement: HTMLInputElement = undefined
let modal: Modal = undefined
Expand Down
4 changes: 3 additions & 1 deletion packages/shared/components/molecules/SelectorInput.svelte
Expand Up @@ -12,7 +12,9 @@
export let options: IOption[] = []
export let selected: IOption = undefined
export let maxHeight: string = 'max-h-64'
export let readonly: boolean = false
// HTML checks whether this value is absent to determine whether the field is readonly
// If the attribute is set to false, HTML interprets it as a readonly field.
export let readonly: boolean = null

let value: string = selected?.key ?? selected?.value
let previousValue: string = value
Expand Down