Textualize / textual

The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.
https://textual.textualize.io/
MIT License
25.73k stars 792 forks source link

tweak to select #5265

Closed willmcgugan closed 2 days ago

willmcgugan commented 2 days ago

Trying to fix the issue where the select drop-down sometimes appears blank.

I think it may be because of race condition in OptionList, where the order of messages may cause a failure to render.

This may work around it. Rather than display:none I've used visibility:hidden. This is because visibility:hidden will still go through a layout procedure and get dimensions even if it can't be seen.

Also prevented the expanded select from scrolling the container. It is not really needed as the drop-down has the constrain rules which will make it visible.

This is a workaround, until we can look at OptionList in more detail.

If anyone sees the blank Select after this has gone in, let me know!

willmcgugan commented 2 days ago

This doesn't fix anything.