Skip to content

Expose new impertive methods on picker #1988

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

Merged
merged 4 commits into from
Apr 19, 2022

Conversation

ethanshar
Copy link
Collaborator

Description

Expose new imperative methods on picker component to allow opening expandable modal

WOAUILIB-2573

Changelog

Expose new imperative methods on picker component to allow opening expandable modal (openExpandable, closeExpandable, toggleExpandable)

Copy link
Contributor

@lidord-wix lidord-wix left a comment

Choose a reason for hiding this comment

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

Looks really good, I wrote a few small comments

@@ -12,6 +12,12 @@ export interface RenderCustomOverlayProps {
toggleExpandable: () => void;
}

export interface ExpandableOverlayMethods {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can extend this interface in the one above (RenderCustomOverlayProps), just for making it look better

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@@ -38,6 +39,7 @@ const filters = [
];

export default class PickerScreen extends Component {
picker = React.createRef();
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider exporting the relevant type and adding it here (for autocomplete and to resolve the ts error from line 290)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I exported the type.
Resolving the TS error on line 290 is a little more complicated than that, but at least there's now the autocomplete on the ref

@ethanshar ethanshar requested a review from lidord-wix April 19, 2022 07:32
@lidord-wix lidord-wix merged commit f96c37e into master Apr 19, 2022
@ethanshar ethanshar deleted the feat/Picker_imperativeMethods branch June 13, 2022 08:17
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