Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RadioListItem in StatusClearAfterPage #37028

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import FormProvider from '@components/Form/FormProvider';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import ScreenWrapper from '@components/ScreenWrapper';
import BaseListItem from '@components/SelectionList/BaseListItem';
import RadioListItem from '@components/SelectionList/RadioListItem';
import Text from '@components/Text';
import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsDefaultProps} from '@components/withCurrentUserPersonalDetails';
import withLocalize from '@components/withLocalize';
Expand Down Expand Up @@ -157,9 +157,9 @@ function StatusClearAfterPage({currentUserPersonalDetails, customStatus}) {
const timePeriodOptions = useCallback(
() =>
_.map(statusType, (item, index) => (
<BaseListItem
<RadioListItem
item={item}
key={`${index}+${item.value}`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While testing the app, I'm seeing this error:
May I know you removed the key props? @luacmartins

Screen.Recording.2024-02-26.at.13.51.31.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm we removed it because RadioListItem adds a key here, but maybe we need that at the higher level.

Copy link
Contributor

@hungvu193 hungvu193 Feb 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha yeah 😅, we should put it back

keyForList={`${index}+${item.value}`}
luacmartins marked this conversation as resolved.
Show resolved Hide resolved
onSelectRow={() => updateMode(item)}
showTooltip={false}
isFocused={item.isSelected}
Expand Down
Loading