Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Keep submenu visible after clicking its form

    I've created a Menu with a couple of items. Each item has a submenu that contains exactly one item, an embeddedComponent. That embedded component is a DynamicForm instance which only contains check boxes. After I click one of the check boxes, the menu closes. Is it possible to prevent this?

    I'm using SmartClient 12.1 LGPL (June 4th, 2020). The code is like this:

    Code:
      menu = isc.Menu.create({
        data: [{
          submenu: [{
            embeddedComponent: isc.DynamicForm.create({
              fields: [... several check boxes ...]
            }),
            showRollOver: false
          }],
          title: 'Item 1'
        }, ... more menu items ...]
      });

    #2
    It's probably another code causing this: I've implemented an itemChange() event on the form which reloads a grid, probably causing the menu to loose focus. I'll look for a solution to fix that.

    Comment


      #3
      I have not found a solution for this. Problem is that whenever I click a check box (which acts as a filter on tabular data), the grid data is reloaded. This causes the menu to hide.

      Comment


        #4
        You seem to be looking for menu/menuItem.autoDismiss.

        Comment


          #5
          You may also want autoDismissOnBlur:false, since if you have left rpcManager.showPrompt at it's default setting, interactivity is blocked during the grid fetch via a clickMask, which will blur whatever has focus.

          Comment

          Working...
          X