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

Change the type of the 'header' property on TabPanel #1079

Closed
skypyxis opened this issue Nov 7, 2019 · 0 comments
Closed

Change the type of the 'header' property on TabPanel #1079

skypyxis opened this issue Nov 7, 2019 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@skypyxis
Copy link

skypyxis commented Nov 7, 2019

[x] bug report
[ ] feature request
[ ] support request

Current behavior
Although it works we get a console error when instead of a string we use a component on the header.
Can you change the propTypes ?

<TabView>
    <TabPanel header={<MyComponent/>}>
        <MyContent />
    </TabPanel>
</TabView>

Just the leftIcon / rightIcon and a string for header is not flexible enough. Having the ability to send a custom header is very important for us.

If we use the <TabMenu /> and not the <TabView><TabPanel /></TabView> then we don't have the error but we lose functionality.

  • React version:
    16.11.0

  • PrimeReact version:
    3.3.2

@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jan 17, 2020
@mertsincan mertsincan self-assigned this Jan 17, 2020
@mertsincan mertsincan changed the title TabPanel error when the header is a component Change the type of the 'header' property on TabPanel Mar 10, 2020
@mertsincan mertsincan added this to the 4.1.0 milestone Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants