Skip to content

Conversation

@castanonrodrigo
Copy link
Contributor

Minor adjustment in the previous PR I made adding the initalSuggestions parameter.
Now, if initialSuggestions is set, the suggestions box will appear every time the input gains focus

@codecov-io
Copy link

Codecov Report

Merging #77 (a3c959a) into master (8c08caa) will decrease coverage by 0.41%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   35.12%   34.71%   -0.42%     
==========================================
  Files           3        3              
  Lines         242      242              
==========================================
- Hits           85       84       -1     
- Misses        157      158       +1     
Impacted Files Coverage Δ
lib/src/chips_input.dart 30.91% <0.00%> (-0.49%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c08caa...a3c959a. Read the comment docs.

void _handleFocusChanged() {
if (_focusNode.hasFocus) {
_openInputConnection();
_suggestions = widget.initialSuggestions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My gut suggests that _suggestions should not repeatedly initialize from widget.initialSuggestions every time there is a focus change.

I'll need to analyze this more closely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it this way now because the value of _suggestions was being erased after the widget lost focus and therefore the suggestionsBox only appeared without the need of keyboard input on the first time the field was focused.

But I appreciate you taking your time to look into it! If you think of another solution, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants