Knowledgebase:
Create a modal popup in Sisense through JS
Posted by Daniel Ranisavljevic on 11 November 2021 12:31 pm

Using JS to create a modal menu using Sisense DOM service.

// making the prism dom injector look more friendly.
const $dom = prism.$injector.get('ux-controls.services.$dom')

// example of how information can be injected into the modal.
const info = 'hello world'

// creating HTML to be displayed by the modal
const popupHtml = `<div> ${info} </div>`

// setting up settings object for modal injector
const settings = {
  template: popupHtml,
  scope: 'fake',
  css: 'resize-modal',
  id: 'myModal'
} // Hack for $dom service

// create the modal using settings
$dom.modal(settings)
(0 vote(s))
Helpful
Not helpful

Comments (0)
Copyright © RAPID BI Pty Ltd 2020