Just an idea: I always try to find an example in Joomla itself. In Joomla 4 there is the spinner. Maybe the code with which this was inserted will help you:
It turns out this functionality is built into Fabrik, but has to be manually enabled, to do so:
Open Fabrik Component Options in Administrator
In the Forms Tab:
Set Enhanced Dropdowns either to per element or to yes (if set to per element, then this also needs to be enabled on a per element basis in the element)
Note this function is marked as WIP (Work in ...