You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectedSpaceId will also be given and could be changed from outside
What I wanted:
When I click 'up' or 'down' button to update spaces,
I wanted to keep that space focused, just moved the order.
The problem:
even though I didn't updated selectedSpaceId or selectedIndex, <TabGroup />'s onChange occurs and gives its old selectedIndex.
I think its behavior feels more like defaultSelectedIndex than selectedIndex compared to any other controlled form components from other libraries, (i.e. react's text input component).
The text was updated successfully, but these errors were encountered:
What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v2.2.0
What browser are you using?
Arc on Mac
Reproduction URL
https://codesandbox.io/p/devbox/6qfgh2
Describe your issue
Please check the above reproduction URL.
Given assumtion:
spaces
are given which will be tab header listspaces
could be updated from outsideselectedSpaceId
will also be given and could be changed from outsideWhat I wanted:
When I click 'up' or 'down' button to update spaces,
I wanted to keep that space focused, just moved the order.
The problem:
even though I didn't updated
selectedSpaceId
orselectedIndex
,<TabGroup />
'sonChange
occurs and gives its oldselectedIndex
.I think its behavior feels more like
defaultSelectedIndex
thanselectedIndex
compared to any other controlled form components from other libraries, (i.e. react's text input component).The text was updated successfully, but these errors were encountered: