-
Notifications
You must be signed in to change notification settings - Fork 397
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
fix: TabsOverflow not being properly disposed when List<items> is changed in FluentTabs #3268
Comments
The overflow is only being updated based on when a resize of the parent element takes place (this is done in JS). I need to see if that can be triggered in a different way as well. The |
Thanks for the under the hood explanation. I figured it might have to do with window resize events to update it but the badge still remained after. You can trigger the same behavior on the demo site by removing items from the dynamic example until the overflow isn't needed anymore but the list has more than one item left. Trying to remove the final item does get rid of the badge. |
Yes, the clicking the close icon on a tab (which is what you do in the example you mention) calls the unregister method on the There are be some pretty big changes needed to make this callable in another way as well. |
Was looking at that one as well. I think it is cause by the internal tabs collection getting out of sync with the actual DOM tabs collection. No solution found yet... |
So I was looking at potential work arounds so I changed my filter function so that instead of changing the collection, I would use the Visible property to hide the filtered items. When I apply the filter to hide all the Inactive Items, if there were any active items in the overflow they are correctly removed from the overflow list and displayed in the correct order in the tabs element. However any Inactive Items that were previously in the overflow remain in the overflow. They remain in the overflow despite the tabs being hidden and unable to be able to be navigated to. That overflow persists past window resizes. |
I see nothing in the code that would cause this issue with |
There may be an underlying Blazor’s UI diffing appears to be causing When removing the
Converting There also appears to be an issue with passing Added some If HashCode Test ResultsBefore
After
This is what works for me:
Let me know if the sounds way out in left field. |
No, this does not sound way out at all! I was looking at this yesterday and sort of came to the same conclusion. Just did not think to change the Dictionary to a List.
Where/when are you doing that? I tried a couple of your proposed changes but it is still not working as it should. Can you list the updated code here of do a quick PR? |
|
Fixed with PR mentioned |
* Replace Dictionary with a List and fix overflow keeping closed items. Fix #3268 * Process review comments. For now we will go with the quick fix * Remove unneccesary null negating
🐛 Bug Report
I have a component that builds makes a tab for each item in a list. When the user filters the list down to a subset of items the number of tabs is correctly updated in the UI but it leaves behind an orphaned badge of overflow items that previously existed.
💻 Repro or Code Sample
🤔 Expected Behavior
If the number of items in the list changed such that there is no longer an overflow, those items should be properly disposed of from TabsOverflow.
😯 Current Behavior
When I change the slider to hide inactive projects, the number of tabs is reduced to the expected amount. If there was an overflow prior to reducing the list of items then the overflow badge remains along with any tab-ids that were in the overflow prior to the item list change.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: