The URL (/editemployee/1) matches both the navigation menu items (Create & Edit) and as a result, selected style is applied to both. A is a special kind of
that knows whether or not it is 'active' or 'pending'.
One difference as of v6 is that activeClassName and activeStyle have been removed from NavLinkProps. The following are the 2 navigation menu items By default, an active class is added to a component when it is active. When you are already on EditEmployee component, and when the element is clicked, it does not send the request. Use the hidden- utility classes to showhide the toggle button responsive side.The following are the 2 routes to get to EditEmployee component. When a value for employee id is passed in the URL, the component is used for editing else for creating a new employee. NavigationManager.NavigateTo("editemployee", true) This will by-pass client-side routing and forces the browser to load the component from the server. ![]() NavigationManager.NavigateTo() method has a boolean forceLoad parameter.When you are already on EditEmployee component, and when the element is clicked, it does not send the request to the server, the redirection happens on the client. ![]()
0 Comments
Leave a Reply. |