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

tabset closes more than one tab #305

Closed
rjahn opened this issue May 4, 2022 · 5 comments
Closed

tabset closes more than one tab #305

rjahn opened this issue May 4, 2022 · 5 comments
Assignees
Labels
bug Something isn't working Prime bug
Milestone

Comments

@rjahn
Copy link
Member

rjahn commented May 4, 2022

Tabset test screen

closed middle tab - first was selected

useLayoutEffect(() => {
80 | if (onLoadCallback) {
81 | if (props.compSizes && props.compSizes.size > 0 && props.selectedIndex !== -1) {

82 | const selectedPanel = props.compSizes.get(props.components[(props.selectedIndex as number)].props.id)?.preferredSize;
| ^ 83 | if (selectedPanel) {
84 | const prefSize:Dimension = {height: selectedPanel.height + 48, width: selectedPanel.width};
85 | sendOnLoadCallback(id, props.className, prefSize, parseMaxSize(props.maximumSize), parseMinSize(props.minimumSize), undefined, onLoadCallback)

@rjahn rjahn added the bug Something isn't working label May 4, 2022
@rjahn rjahn added this to the 1.8 milestone May 4, 2022
@maximilianweidenauer
Copy link
Contributor

I've fixed the crash, but now the closing isn't correct, seems to be a PrimeReact bug with onClose and dynamic created Tabs.

In the demo, there are 5 tabs when I close the third tab, the forth doesn't get displayed anymore, so there are only 3 remaining but there should be 4, in my array which I pass to the "TabPanel" component are 4 Tabs.

I've created a ticket in the PrimeReact repository:
primefaces/primereact#2842

@maximilianweidenauer maximilianweidenauer changed the title tabset close - crash tabset closes more than one tab May 5, 2022
@rjahn rjahn modified the milestones: 1.8, 2.0, 2.1 May 23, 2022
@rjahn rjahn added the Prime bug label Jul 6, 2022
@maximilianweidenauer
Copy link
Contributor

They keep pushing exactly this ticket back...

@maximilianweidenauer maximilianweidenauer modified the milestones: 2.2, 3.0 Dec 7, 2022
@maximilianweidenauer
Copy link
Contributor

Changed to 3.0 because this isn't fixed in PrimeReact yet

@rjahn
Copy link
Member Author

rjahn commented Feb 20, 2024

Current status?

@maximilianweidenauer
Copy link
Contributor

done with new PrimeReact update, wanted to close when merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Prime bug
Projects
None yet
Development

No branches or pull requests

2 participants