fix: FluentMessageBar onclick bug and not using Link?.Target #1462
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the FluentMessageBar some @OnClick event bindings were broken since version 4.4.0, I replaced them with the new OnClick. If a Target was specified in the Link of a notification, it was not used in the FluentMessageBar and always fell back to _blank.
Pull Request
📖 Description
Fix: When opening the FluentMessageBar, it would create the unhandledexception "Unhandled exception rendering component: Unable to set property 'onclick' on object of type 'Microsoft.FluentUI.AspNetCore.Components.FluentAnchor'. The error was: Arg_InvalidCastException", this has been fixed by replacing the @OnClick with OnClick
If the Link in the Message would contain a target, this target was not used (hardcoded to _blank). Now it user the target in the link or _blank in case no target has been specified.
👩💻 Reviewer Notes
Add messages to the FluentMessageBar and open it.
📑 Test Plan
✅ Checklist
General
Component-specific
⏭ Next Steps