Topbar
The widget appears as an icon on the right side of the bar along the top of the Facilio application interface. Clicking the icon opens the widget.
#
TriggersFunction | Description | Example |
---|---|---|
showMenu | Shows the menu icon on the topbar | app.interface.trigger(‘showMenu’, {menu: true}); |
showHeader | Show or hide the side panel header | app.interface.trigger(‘showHeader’, {header: true}); |
hide | Hides the side panel | app.interface.trigger(‘hide’); |
resize | Resize the side panel | app.interface.trigger(‘resize’, {height: ‘100%’}); |
setBadge | Set notification badge on the menu icon | const badgeOptions = { value: 20, max: 100, isDot: false }; app.interface.trigger(‘setBadge’, badgeOptions); |
resetBadge | Reset notification badge count | app.interface.trigger(‘resetBadge’); |
setIcon | Set icon for the topbar menu | const iconName = ‘help’; app.interface.trigger(‘setIcon’, {icon: iconName}); |
#
EventsEvent | Description | Example |
---|---|---|
topbar.active | This event will be triggered whenever the topbar panel is opened | app.on(‘topbar.active’, () => { console.log(‘topbar is opened’); }); |
topbar.inactive | This event will be triggered whenever the topbar panel is closed | app.on(‘topbar.inactive, () => {console.log(‘topbar is closed); }); |