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};
|
||||
submitCallback: (res: boolean) => void;
|
||||
closeCallback: (err?: Error) => void;
|
||||
skipCallback: () => void;
|
||||
plugin: MediaDbPlugin;
|
||||
searchBtn: any;
|
||||
cancelButton: any;
|
||||
|
|
@ -44,14 +43,14 @@ export class MediaDbPreviewModal extends Modal {
|
|||
const bottomSettingRow = new Setting(contentEl);
|
||||
bottomSettingRow.addButton(btn => {
|
||||
btn.setButtonText('Cancel');
|
||||
btn.onClick(() => this.close());
|
||||
btn.onClick(() => this.closeCallback());
|
||||
btn.buttonEl.addClass('media-db-plugin-button');
|
||||
this.cancelButton = btn;
|
||||
});
|
||||
bottomSettingRow.addButton(btn => {
|
||||
btn.setButtonText('Ok');
|
||||
btn.setCta();
|
||||
btn.onClick(() => this.submit());
|
||||
btn.onClick(() => this.submitCallback(true));
|
||||
btn.buttonEl.addClass('media-db-plugin-button');
|
||||
this.submitButton = btn;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue