Replace from trigger to invoke

This commit is contained in:
Stanislav Romanov 2022-09-15 10:36:45 +03:00
parent 8374d94093
commit 7dfbb56d1f
7 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@
@text='Save'
@style='primary'
@size='sm'
@onClick={{monaco.triggerSendValue}}
@onClick={{monaco.invokeSendValue}}
/>
<Button @text='Cancel' @size='sm' @onClick={{this.setInitialValue}} />
<Button @text='Reset' @size='sm' @onClick={{this.reset}} />

View file

@ -5,4 +5,4 @@
...attributes
></div>
{{yield (hash editor=this.editor triggerSendValue=this.triggerSendValue)}}
{{yield (hash editor=this.editor invokeSendValue=this.invokeSendValue)}}

View file

@ -43,7 +43,7 @@ export default class MonacoEditorComponent extends Component {
}
@action
triggerSendValue() {
invokeSendValue() {
this.args.sendValue?.(this.editor.getValue());
}

View file

@ -35,7 +35,7 @@
class='ml-auto self-start'
{{! data-dismiss-target='#toast-default' }}
aria-label='Close'
{{on 'click' toast.triggerOnClose}}
{{on 'click' toast.invokeOnClose}}
>
<Icons::Close />
</button>

View file

@ -7,12 +7,12 @@
...attributes
>
<div class='p-4'>
{{yield (hash triggerOnClose=this.triggerOnClose)}}
{{yield (hash invokeOnClose=this.invokeOnClose)}}
</div>
{{#if @autoClose}}
<ProgressBar
@duration={{this.autoCloseDuration}}
@onFinish={{this.triggerOnClose}}
@onFinish={{this.invokeOnClose}}
class={{@closeIndicatorClass}}
/>
{{/if}}

View file

@ -42,7 +42,7 @@ export default class ToastComponent extends Component {
}
@action
triggerOnClose() {
invokeOnClose() {
this.args.onClose?.();
}

View file

@ -9,7 +9,7 @@
type='submit'
@text='Save'
@style='primary'
@onClick={{monaco.triggerSendValue}}
@onClick={{monaco.invokeSendValue}}
/>
<Button @text='Cancel' @onClick={{this.cancel}} />