luigi
luigi copied to clipboard
External links support in Luigi.ux().showAlert()
Description
Could you be so kind and add possibility to use external links in Luigi.ux().showAlert()
method?
Currently only the internal links are supported in the form of relative or absolute paths (see here: https://docs.luigi-project.io/docs/luigi-core-api/?section=showalert)
Reasons I would link to use link to documentation in message and it is external link.
Hi @golojg, have you tried to use "dismissKey"? With that you can define a "link" and react when it was clicked. See https://docs.luigi-project.io/docs/luigi-core-api/?section=parameters-21
usage example:
Luigi.ux().showAlert({
text: 'Read our {docs}!',
links: {
docs: {
text: 'documentation',
dismissKey: 'docs'
}
}
})
.then((dismissKey) => {
if(dismissKey === 'docs') {
window.open('https://path.to/your/docs');
}
});