@@ -4,18 +4,18 @@ import type {ValueOf} from 'type-fest';
44import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
55import Modal from '@components/Modal' ;
66import ScreenWrapper from '@components/ScreenWrapper' ;
7- import SelectionList from '@components/SelectionListWithSections' ;
8- import RadioListItem from '@components/SelectionListWithSections/RadioListItem' ;
7+ import SelectionList from '@components/SelectionList' ;
8+ import RadioListItem from '@components/SelectionList/ListItem/RadioListItem' ;
9+ import type { ListItem } from '@components/SelectionList/types' ;
910import useLocalize from '@hooks/useLocalize' ;
1011import useThemeStyles from '@hooks/useThemeStyles' ;
1112import CONST from '@src/CONST' ;
1213
13- type ListItemType = {
14+ type ListItemType = ListItem < ValueOf < typeof CONST . POLICY . ROLE > > & {
1415 value : ValueOf < typeof CONST . POLICY . ROLE > ;
1516 text : string ;
1617 alternateText : string ;
1718 isSelected : boolean ;
18- keyForList : ValueOf < typeof CONST . POLICY . ROLE > ;
1919} ;
2020
2121type WorkspaceMemberDetailsPageProps = {
@@ -55,12 +55,11 @@ function WorkspaceMemberDetailsRoleSelectionModal({isVisible, items, onRoleChang
5555 />
5656 < View style = { [ styles . containerWithSpaceBetween , styles . pointerEventsBoxNone ] } >
5757 < SelectionList
58- sections = { [ { data : items } ] }
58+ data = { items }
5959 ListItem = { RadioListItem }
6060 onSelectRow = { onRoleChange }
61- isAlternateTextMultilineSupported
6261 shouldSingleExecuteRowSelect
63- initiallyFocusedOptionKey = { items . find ( ( item ) => item . isSelected ) ?. keyForList }
62+ initiallyFocusedItemKey = { items . find ( ( item ) => item . isSelected ) ?. keyForList }
6463 addBottomSafeAreaPadding
6564 />
6665 </ View >
0 commit comments