Skip to content

Commit

Permalink
Merge pull request #152 from AngeloAvv/fix/raw-autocomplete-wrong-dis…
Browse files Browse the repository at this point in the history
…play-value

ReactiveRawAutocomplete not setting correct displayValue
  • Loading branch information
vasilich6107 authored May 14, 2024
2 parents 7966724 + f501f53 commit e9efb2b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,11 @@ class _ReactiveRawAutocompleteState<T, V extends Object>

@override
void onControlValueChanged(dynamic value) {
final effectiveValue = (value == null) ? '' : value.toString();
final widgetInstance = (widget as ReactiveRawAutocomplete<T, V>);

final effectiveValue = (value == null)
? ''
: widgetInstance.displayStringForOption(value as V);
_textController.value = _textController.value.copyWith(
text: effectiveValue,
selection: TextSelection.collapsed(offset: effectiveValue.length),
Expand Down

0 comments on commit e9efb2b

Please sign in to comment.