Added a new disabled property for RouterLinks to override their functionality if needed.
This commit is contained in:
parent
6a21111c3d
commit
6fed40f37b
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user