jQuery UI Widgets › Forums › Angular › Disabling jqxMenu items
This topic contains 4 replies, has 2 voices, and was last updated by Stanislav 6 years, 6 months ago.
-
AuthorDisabling jqxMenu items Posts
-
Hello, I’m using a jqxMenu component. I have 2 questions.
1) Is it possible to make the menu item to be disabled initially without using jqxMenu API ? ( i.e. by adding some attribute in HTML )
2) When disabling a menu item with jqxMenu API, I still can click on that menu item despite the menu item seems disabled. What I’ve done wrong ? ( see code demonstrating this )Thank you !
app.component.html
<jqxNotification #notification> <div>Saving...</div> </jqxNotification> <jqxMenu #jqxMenu> <ul> <li> <span>File</span> <ul> <li (click)="notification.open()" id="save-menu-item"> <img style='float: left; margin-right: 5px;' src='/assets/save.png'/> <span>Save</span> </li> </ul> </li> </ul> </jqxMenu> <br/> <input type="button" value="Disable menu item" (click)="menu.disable('save-menu-item', true)">
Hello, btw I’ve got the same problem with jqxButton. When button is disabled I can still click it :
<jqxButton [height]='32' [width]="94" [textImageRelation]='"imageBeforeText"' [textPosition]='"center"' [imgSrc]='"/assets/save.png"' [disabled]="isDisabled" (click)="isDisabled = !isDisabled" #loginButton> Login </jqxButton>
Thank you !
Hello Liam,
Here is an example on how to disable the jqxMenu on button click:
app.component.html
... <input type="button" value="Disable menu item" (click)="OpenNotification($event)">
app.component.ts
export class AppComponent { @ViewChild('jqxMenu') myMenu: jqxMenuComponent; OpenNotification(event: any): void { this.myMenu.disabled(true); } }
I made the answer based on this demo if you are interested: Demo
As for your second post, yes, we are aware of this issue and we are working on a solution, a fix should be out in the next update very soon.
Best Regards,
StanislavjQWidgets Team
http://www.jqwidgets.com/Hello, could you tell please when approximately will be released a new version with this fix ?
Thank you !Hello Liam,
I am not certain of when the fix will be released.
I would suggest you keep an eye on these:
RoadMap
Release HistoryWhen e new version is released it will be posted in the ‘release history’ along with all that has been updated/changed and improved.
Best Regards,
StanislavjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.