Replies: 4 comments 1 reply
-
You need to use 3 tick marks (```) in the GH editor to mark a code block... |
Beta Was this translation helpful? Give feedback.
-
i uploaded the code sample in txt file |
Beta Was this translation helpful? Give feedback.
-
Next time, if a reproduction requires creating 3 files, then just supply a zipped project or a repo here on GH. This is way too labor intensive to get going for us. Check with the docs at https://learn.microsoft.com/en-us/aspnet/core/blazor/components/lifecycle?view=aspnetcore-9.0. It is normal Think you can solve the behavior for your situation by setting a bool in Transfrering this to the discussion area as it is not really an issue, I believe. |
Beta Was this translation helpful? Give feedback.
-
🐛 Bug Report
There is an unexpected behavior when using the FluentTabs and FluentTab components. Specifically, if the content inside a FluentTab is a child component that contains an EventCallback parameter, and this callback is handled in the parent component, the following issues occur:
OnParametersSetAsync Triggering in the Child Component: Every time the tab is switched in the parent component, the OnParametersSetAsync method in the child component is triggered. This behavior happens even when no parameters have changed.
Issue with EditForm: If the child component contains an EditForm and any bound property changes, OnParametersSetAsync is triggered again inside the child component. This occurs even if the change does not directly relate to the parameters being passed to the child.
Conditions:
This issue only occurs when the parent component is handling the child component’s EventCallback of a Func delegate.
If the parent stops handling the EventCallback, the behavior resolves, and the tabs work as expected without triggering OnParametersSetAsync unnecessarily.
💻 Repro or Code Sample
@page "/ParentComponent"
ParentComponent
Tab one content. This is for testing. @* *@ Tab two content. This is for testing.}
ChildComponent
}
🤔 Expected Behavior
The OnParametersSetAsync method in the child component should only be triggered when parameters passed to the child component actually change. It should not be triggered unnecessarily when switching tabs or when properties bound to an EditForm change, provided the parent is handling the EventCallback correctly.
😯 Current Behavior
💁 Possible Solution
🔦 Context
🌍 Your Environment
Beta Was this translation helpful? Give feedback.
All reactions