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

TabView: TabPanel doesn't close if the 'closeIcon' prop is used #6165

Closed
gorsheninmv opened this issue Mar 16, 2024 · 2 comments · Fixed by #6166
Closed

TabView: TabPanel doesn't close if the 'closeIcon' prop is used #6165

gorsheninmv opened this issue Mar 16, 2024 · 2 comments · Fixed by #6166
Assignees
Labels
Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior
Milestone

Comments

@gorsheninmv
Copy link

Describe the bug

If the closeIcon prop is used, it's impossible to close the tab with closeable prop.

Reproducer

https://stackblitz.com/edit/5h3nmf?file=src%2FApp.jsx

PrimeReact version

latest

React version

18.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

TabPanel is closed regardless of 'closeIcon' prop value

@gorsheninmv gorsheninmv added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 16, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component. labels Mar 16, 2024
@melloware
Copy link
Member

@gorsheninmv i fixed your StackBlitz.: https://stackblitz.com/edit/5h3nmf-5okq3v?file=src%2FApp.jsx,src%2FCustomIcon.jsx

When you use SVG icons you have to pass the props to the icon which contains the onClick event.

export function CustomIcon(options) {
  return (
    <svg
      {...options.iconProps}
      width="32x"
      height="32px"

@gorsheninmv
Copy link
Author

Thanks for the support and your time!

melloware added a commit to melloware/primereact that referenced this issue Mar 18, 2024
@gucal gucal modified the milestones: 10.5.2, 10.6.0 Mar 19, 2024
melloware added a commit to melloware/primereact that referenced this issue Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: By Design The behavior in the issue is by design and the component exhibits the expected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants