Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #2557, credit to Will: #2557 (comment)
After a diversion into #2574 and #2582, with the obvious need to dive into the latter much deeper, we're going with this fix for the moment. I don't think it's the fix here, but it's for sure a fix that works for now and this should get a revisit if and when #2582 gets a deep dive.
Long story short: because of the nature of how
Select
works, most of the times that the content refresh happens theOptionList
has no size. No size means it's impossible to calculate the content as thewidth
is needed to know how many lines is needed for each prompt. The obvious fix here would be to add_on_show
toOptionList
and refresh the content, much like it does with_on_resize
; however I'm not seeing the expected events happen when it's used withinSelect
.This fix delays the refresh until there is size for the widget, having the desired effect, albeit not in the most ideal way.