DEV: Preload prompt list on component initialization (#165)
This commit is contained in:
parent
6e01b2c334
commit
b470692409
|
@ -62,6 +62,15 @@ export default class AiHelperContextMenu extends Component {
|
|||
@tracked _dEditorInput;
|
||||
@tracked _contextMenu;
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
|
||||
// Fetch prompts only if it hasn't been fetched yet
|
||||
if (this.helperOptions.length === 0) {
|
||||
this.loadPrompts();
|
||||
}
|
||||
}
|
||||
|
||||
willDestroy() {
|
||||
super.willDestroy(...arguments);
|
||||
document.removeEventListener("selectionchange", this.selectionChanged);
|
||||
|
|
Loading…
Reference in New Issue