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
Describe the problem
This is an issue with Patternfly 6 (at least)
The label property of MenuGroup is declared as type ReactNode. It can indeed handle that and we use it at Agama.
But in the case of DropDownGroup and SelectGroup the properties label are defined as type string. They can actually handle everything that MenuGroup's label can handle (eg. see agama-project/agama#1977).
Internally SelectGroup is using MenuGroup. So the limitation doesn't make fully sense to me, although it could be intentional for some reason I'm overlooking.
MenuGroup#label was an string until two years ago, #8219 and the component itself was added 5 years ago e867f09 While the SelectGroup#label types dates from 6 years ago. All that makes me think that those types were simply left behind by omission.
Describe the problem
This is an issue with Patternfly 6 (at least)
The
label
property ofMenuGroup
is declared as type ReactNode. It can indeed handle that and we use it at Agama.But in the case of
DropDownGroup
andSelectGroup
the propertieslabel
are defined as type string. They can actually handle everything thatMenuGroup
's label can handle (eg. see agama-project/agama#1977).Internally SelectGroup is using MenuGroup. So the limitation doesn't make fully sense to me, although it could be intentional for some reason I'm overlooking.
MenuGroup#label was an string until two years ago, #8219 and the component itself was added 5 years ago e867f09 While the SelectGroup#label types dates from 6 years ago. All that makes me think that those types were simply left behind by omission.
How do you reproduce the problem?
See agama-project/agama#1977
Expected behavior
Type check does not fail when a ReactNode is used as label for
DropDownGroup
orSelectGroup
.Is this issue blocking you?
The workarounds are to disable type checking for that file or to use a
Menu
instead of aDropDown
. Both doable but annoying.The text was updated successfully, but these errors were encountered: