Open nkosi23 opened 2 years ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Background and Motivation
Knowing the state of a NavLink is often needed in situations where the html layout is complex and setting a css class on the
<a>
tag is not enough. This is for example the case if the user also needs to add a class to the parent element of a link as in the following situation:Real world situations may be even more complex than that. There is currently a need to use an ugly workaround consisting in reimplementing part of the logic of NavLink, such as:
Proposed API
Usage Examples
And in csharp:
Alternative Designs
I cannot think of an alternative way to do that, but I am not extremely familiar with Blazor and the capabilities of the razor engine (for example I do not know if it is possible - or desirable - to have a one way binding allowing a containing component to monitor a property of one of its children components such as IsActive. If this is not possible or desirable, NavLink.IsActive may not be necessary - but I feel it may still be useful to develop custom components inheriting from NavLink in csharp).
Risks
I cannot see any risk with this.