Godot Version
4.3
Question
The general idea is to have a searchbar that when selected brings up a dropdown menu for a list of options, then the user can type and the list will shrink according to the matching results. I have already implemented all the basic logic for the searching part but the issue I keep having is the dropdown not behaving how I would like. This implementation with ItemList
works flawlessly on its own but when brought into a UI to actually use this searchable dropdown it pushes all the other UI elements out of the way where the dropdown is because it is part of the UI. I tried making this work with nearly every variation of the Window
subclasses (particularly the PopupMenu
and PopupPanel
) but they all had an issue where the focus was take away from the LineEdit
as soon as the popup was shown to the user. I tried grabbing focus back to the LineEdit
in countless ways but none worked. Not even calling grab_focus()
or grab_click_focus()
in an infinite loop worked.
I have a video showcasing the desired result but I am not allowed to post it so apologies for that.