I have component the basic logic of which is here (I used "..." to hide unnecessary context).
const tabs = React.useRef(null); const [showSelect