Drawer open/close in v2

  • Hi, I ended up investigating this more.

    To toggle a drawer on a table using JS:

rowId = mode.getFirstRow().Id 
skuid.$C(<TableId>).cpi.toggleDrawer(rowId)
  • I haven't found a way to check if the drawer is open or not.

    Close all Drawers:

skuid.$('#<TableId> tbody tr [aria-label="close drawer"]').each((i, ele) =>{
       skuid.$(ele)[0].click()
});

it uses JQuery to iterate over rows on the table and if they are opened then they will be closed.
or you can use inbuilt table function
skuid.$C()._cpi.closeAllDrawers()

  • Open all drawers :

skuid.$('#<TableId> tbody tr [aria-label="open drawer"]').each((i, ele) =>{
        skuid.$(ele)[0].click()
    });

it uses JQuery to iterate over rows on the table and if they are closed then they will be opened.

There is no inbuilt function to open all drawers, like for close.

Now, you can add JS Snippet with code for ‘Close all drawers’ to Before load actions. So JQuery will close all drawers, and then Skuid will open the one user selected.

Note, JQuery works and should keep working, but if Skuid changes something then it could break.

Best,

Lukas