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

Do we need to pass in a triggerNode to getPopupContainer in Select #18797

Closed
1 task done
escapiststupor opened this issue Sep 13, 2019 · 2 comments
Closed
1 task done
Assignees

Comments

@escapiststupor
Copy link
Contributor

escapiststupor commented Sep 13, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

In your example repo we don't need to pass anything to getPopupContainer

but the type file says getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
What exactly should we pass as triggerNode?

What is expected?

Not sure, maybe getPopupContainer?: () => HTMLElement;

The type should be the same as in RcSelect where getPopupContainer is typed as React.ReactNode | (() => React.ReactNode);

What is actually happening?

Environment Info
antd 3.23.2
React 16.8.6
System Mac OSX
Browser Chrome
@afc163
Copy link
Member

afc163 commented Sep 13, 2019

You don't have to pass argument to getPopupContainer, the definite works fine: https://codesandbox.io/s/keen-davinci-3o1fu

@afc163 afc163 closed this as completed Sep 13, 2019
@mtadams007
Copy link
Contributor

mtadams007 commented Oct 5, 2021

@afc163 Shouldn't the triggerNode be optional then?
(triggerNode?: HTMLElement) => HTMLElement ?

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

No branches or pull requests

4 participants