Skip to content

Commit

Permalink
fix: directly pass action buttons (instead of in state)
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
  • Loading branch information
elzody committed Dec 12, 2024
1 parent c38dca0 commit 1d229e9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/mixins/assistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ export default {
data() {
return {
task: null,
buttons: [
{
label: t('richdocuments', 'Insert into document'),
title: t('richdocuments', 'Insert into document'),
onClick: () => this.handleTask(this.task),
},
],
}
},
methods: {
Expand All @@ -29,7 +22,13 @@ export default {
appId: 'richdocuments',
customId: 'richdocuments:' + this.fileid,
isInsideViewer: true,
actionButtons: this.buttons,
actionButtons: [
{
label: t('richdocuments', 'Insert into document'),
title: t('richdocuments', 'Insert into document'),
onClick: () => this.handleTask(this.task),
},
],
})
},
handleTask(task) {
Expand Down

0 comments on commit 1d229e9

Please sign in to comment.