mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 14:49:57 +08:00
Retain global page components between routes
This commit is contained in:
@ -24,6 +24,13 @@ export default class AlertManager extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
config(isInitialized, context) {
|
||||
// Since this component is 'above' the content of the page (that is, it is a
|
||||
// part of the global UI that persists between routes), we will flag the DOM
|
||||
// to be retained across route changes.
|
||||
context.retain = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show an Alert in the alerts area.
|
||||
*
|
||||
|
Reference in New Issue
Block a user