samples/without-shell-navigation/helpers.js
// Expande/Collapse sub menu of structural navigation entries like 'Actions'
Expande/Collapse sub menu of structural navigation entries like 'Actions'
Expande / Collapse sub menu of structural navigation entries like ' Actions '
function toggleNestedListSubMenu(event){
  const BUTTON = event.currentTarget;
  const SUBLIST_ID = BUTTON.getAttribute('aria-controls');
  const IS_EXPANDED = BUTTON.getAttribute('aria-expanded');
  if (IS_EXPANDED === 'true') {
    document.getElementById(SUBLIST_ID).setAttribute('aria-hidden', 'true');
    BUTTON.setAttribute('aria-expanded', 'false');
    BUTTON.querySelector('i[role]').setAttribute('class', 'sap-icon--navigation-right-arrow');
  } else {
    document.getElementById(SUBLIST_ID).setAttribute('aria-hidden', 'false');
    BUTTON.setAttribute('aria-expanded', 'true');
    BUTTON.querySelector('i[role]').setAttribute('class', 'sap-icon--navigation-down-arrow');
  }
}
function toggleNestedListSubMenu ( event ) { const BUTTON = event . currentTarget ; const SUBLIST_ID = BUTTON . getAttribute ( 'aria-controls' ) ; const IS_EXPANDED = BUTTON . getAttribute ( 'aria-expanded' ) ; if ( IS_EXPANDED === 'true' ) { document . getElementById ( SUBLIST_ID ) . setAttribute ( 'aria-hidden' , 'true' ) ; BUTTON . setAttribute ( 'aria-expanded' , 'false' ) ; BUTTON . querySelector ( 'i[role]' ) . setAttribute ( 'class' , 'sap-icon--navigation-right-arrow' ) ; } else { document . getElementById ( SUBLIST_ID ) . setAttribute ( 'aria-hidden' , 'false' ) ; BUTTON . setAttribute ( 'aria-expanded' , 'true' ) ; BUTTON . querySelector ( 'i[role]' ) . setAttribute ( 'class' , 'sap-icon--navigation-down-arrow' ) ; } }
Expande/Collapse sub menu of structural navigation entries like 'Actions'
Expande / Collapse sub menu of structural navigation entries like ' Actions '