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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Disabling jqxMenu items #99252

    Liam
    Participant

    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)">
    
    Disabling jqxMenu items #99277

    Liam
    Participant

    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 !

    Disabling jqxMenu items #99295

    Stanislav
    Participant

    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,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

    Disabling jqxMenu items #99649

    Liam
    Participant

    Hello, could you tell please when approximately will be released a new version with this fix ?
    Thank you !

    Disabling jqxMenu items #99665

    Stanislav
    Participant

    Hello Liam,

    I am not certain of when the fix will be released.
    I would suggest you keep an eye on these:
    RoadMap
    Release History

    When 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,
    Stanislav

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.