fix: use correct callbacks
This commit is contained in:
parent
c36fa0311a
commit
3c8d07e7de
1 changed files with 2 additions and 3 deletions
|
|
@ -7,7 +7,6 @@ export class MediaDbPreviewModal extends Modal {
|
||||||
options: { attachTemplate: boolean, attachFile: TFile};
|
options: { attachTemplate: boolean, attachFile: TFile};
|
||||||
submitCallback: (res: boolean) => void;
|
submitCallback: (res: boolean) => void;
|
||||||
closeCallback: (err?: Error) => void;
|
closeCallback: (err?: Error) => void;
|
||||||
skipCallback: () => void;
|
|
||||||
plugin: MediaDbPlugin;
|
plugin: MediaDbPlugin;
|
||||||
searchBtn: any;
|
searchBtn: any;
|
||||||
cancelButton: any;
|
cancelButton: any;
|
||||||
|
|
@ -44,14 +43,14 @@ export class MediaDbPreviewModal extends Modal {
|
||||||
const bottomSettingRow = new Setting(contentEl);
|
const bottomSettingRow = new Setting(contentEl);
|
||||||
bottomSettingRow.addButton(btn => {
|
bottomSettingRow.addButton(btn => {
|
||||||
btn.setButtonText('Cancel');
|
btn.setButtonText('Cancel');
|
||||||
btn.onClick(() => this.close());
|
btn.onClick(() => this.closeCallback());
|
||||||
btn.buttonEl.addClass('media-db-plugin-button');
|
btn.buttonEl.addClass('media-db-plugin-button');
|
||||||
this.cancelButton = btn;
|
this.cancelButton = btn;
|
||||||
});
|
});
|
||||||
bottomSettingRow.addButton(btn => {
|
bottomSettingRow.addButton(btn => {
|
||||||
btn.setButtonText('Ok');
|
btn.setButtonText('Ok');
|
||||||
btn.setCta();
|
btn.setCta();
|
||||||
btn.onClick(() => this.submit());
|
btn.onClick(() => this.submitCallback(true));
|
||||||
btn.buttonEl.addClass('media-db-plugin-button');
|
btn.buttonEl.addClass('media-db-plugin-button');
|
||||||
this.submitButton = btn;
|
this.submitButton = btn;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue