We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Wrap TabPane in a custom exponent and try to extend the tab property. Here is an example:
const CustomTabPane = (props) => { const { hasError, tab, children, ...rest } = props; const tabTitle = ( <> {tab} {hasError ? "****" : ""} </> ); return ( <TabPane {...rest} tab={tabTitle}> {children} {hasError && " (Has Error)"} </TabPane> ); }; const Demo = () => ( <Tabs defaultActiveKey="1" onChange={callback}> <CustomTabPane tab="Tab 1" key="1"> Content of Tab Pane 1 </CustomTabPane> <CustomTabPane tab="Tab 2" key="2" hasError> Content of Tab Pane 2 </CustomTabPane> <CustomTabPane tab="Tab 3" key="3"> Content of Tab Pane 3 </CustomTabPane> </Tabs> );
I would expect the title for the second tab pane to be "Tab 2****", but it is just "Tab 2". I cannot extend the value.
Extended tab value will appear.
The original tab value appears
The text was updated successfully, but these errors were encountered:
see https://codesandbox.io/s/basic-antd-4-17-0-alpha-5-forked-h0z66
CustomTabPane props is not what you think
Sorry, something went wrong.
Duplicate of #4853
No branches or pull requests
Reproduction link
Steps to reproduce
Wrap TabPane in a custom exponent and try to extend the tab property. Here is an example:
I would expect the title for the second tab pane to be "Tab 2****", but it is just "Tab 2". I cannot extend the value.
What is expected?
Extended tab value will appear.
What is actually happening?
The original tab value appears
The text was updated successfully, but these errors were encountered: