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

support renderHeader in useWheelPicker mode #3165

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

adids1221
Copy link
Contributor

Description

Picker support renderHeader in wheel picker mode.
PickerItemList file arrangment.

Changelog

Picker support renderHeader in wheel picker mode.

Additional info

MADS-4314

};

const renderWheel = () => {
const {useSafeArea} = topBarProps ?? {};
Copy link
Collaborator

@Inbal-Tish Inbal-Tish Jul 7, 2024

Choose a reason for hiding this comment

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

'useSafeArea' comes from props, why extract it from topBarProps?

if (renderHeader) {
return renderHeader?.({onDone: topBarProps?.onDone, onCancel: topBarProps?.onCancel});
} else if (useWheelPicker) {
const {cancelButtonProps, cancelLabel, doneLabel, title, titleStyle, containerStyle} = topBarProps ?? {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's move it to the top of the function and extract the onDone and onCancel as well to keep it clean

@adids1221 adids1221 requested a review from Inbal-Tish July 7, 2024 13:24
@Inbal-Tish Inbal-Tish merged commit 06c7f5b into master Jul 8, 2024
1 check passed
@Inbal-Tish Inbal-Tish deleted the infra/PickerItemList_renderHeader_arrangement branch July 8, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants