From 13b81c73a9a2eb25a3b251f4c6d2ed96025083e4 Mon Sep 17 00:00:00 2001 From: Zuzanna Furtak Date: Thu, 9 Oct 2025 11:27:45 +0200 Subject: [PATCH] Make WriteCapabilityPage use new SelectionList --- src/pages/settings/Report/WriteCapabilityPage.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/settings/Report/WriteCapabilityPage.tsx b/src/pages/settings/Report/WriteCapabilityPage.tsx index c58697ce10f0..19b32c30a00d 100644 --- a/src/pages/settings/Report/WriteCapabilityPage.tsx +++ b/src/pages/settings/Report/WriteCapabilityPage.tsx @@ -4,8 +4,8 @@ import type {ValueOf} from 'type-fest'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; -import SelectionList from '@components/SelectionListWithSections'; -import RadioListItem from '@components/SelectionListWithSections/RadioListItem'; +import SelectionList from '@components/SelectionList'; +import RadioListItem from '@components/SelectionList/ListItem/RadioListItem'; import useLocalize from '@hooks/useLocalize'; import useReportIsArchived from '@hooks/useReportIsArchived'; import {updateWriteCapability as updateWriteCapabilityUtil} from '@libs/actions/Report'; @@ -30,6 +30,7 @@ function WriteCapabilityPage({report, policy}: WriteCapabilityPageProps) { keyForList: value, isSelected: value === (report?.writeCapability ?? CONST.REPORT.WRITE_CAPABILITIES.ALL), })); + const selectedOptionKey = writeCapabilityOptions.find((locale) => locale.isSelected)?.keyForList; const isReportArchived = useReportIsArchived(report.reportID); const isAbleToEdit = canEditWriteCapability(report, policy, isReportArchived); @@ -57,11 +58,11 @@ function WriteCapabilityPage({report, policy}: WriteCapabilityPageProps) { onBackButtonPress={goBack} /> updateWriteCapability(option.value)} shouldSingleExecuteRowSelect - initiallyFocusedOptionKey={writeCapabilityOptions.find((locale) => locale.isSelected)?.keyForList} + initiallyFocusedItemKey={selectedOptionKey} />