Added a new disabled property for RouterLinks to override their functionality if needed.

This commit is contained in:
Matt Mo 2022-12-17 10:14:06 -08:00
parent 6a21111c3d
commit 6fed40f37b

View File

@ -117,6 +117,7 @@ class RouterLink extends IgniteElement {
get properties() {
return {
disabled: false,
active: false,
routes: [],
target: null
@ -164,8 +165,10 @@ class RouterLink extends IgniteElement {
}
onClick(event) {
event.preventDefault();
Router.navigate(this.target, null, false);
if (!this.disabled) {
event.preventDefault();
Router.navigate(this.target, null, false);
}
}
cleanup() {