Skip to content

Commit

Permalink
Fix issue with AssetAmountInput validation happening too early
Browse files Browse the repository at this point in the history
Was due to Textual changed behaviour

In 0.53.0 this change caused that:
BREAKING: for many widgets, messages are now sent when programmatic changes that mirror user input are made #4256

And with 0.56.0 this fix is available.
See also: Textualize/textual#4392
  • Loading branch information
mzebrak committed Apr 16, 2024
1 parent fd47c95 commit 8af4770
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clive/__private/ui/widgets/inputs/asset_amount_base_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def __init__(
----
placeholder: If not provided, placeholder will be dynamically generated based on the asset type.
"""
self._currency_selector: CurrencySelectorBase[AssetInputT] = self.create_currency_selector()
with self.prevent(CurrencySelectorBase.Changed):
self._currency_selector: CurrencySelectorBase[AssetInputT] = self.create_currency_selector()
default_asset_type = self._currency_selector.default_asset_cls
default_asset_precision = Asset.get_precision(default_asset_type)

Expand Down

0 comments on commit 8af4770

Please sign in to comment.