fix submit action
This commit is contained in:
parent
f8226cf892
commit
f857bbc437
1 changed files with 9 additions and 1 deletions
|
|
@ -59,7 +59,15 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$wire.call(this.submitAction, this.password, this.selectedActions)
|
|
||||||
|
const methodName = this.submitAction.split('(')[0];
|
||||||
|
const paramsMatch = this.submitAction.match(/\((.*?)\)/);
|
||||||
|
const params = paramsMatch ? paramsMatch[1].split(',').map(param => param.trim()) : [];
|
||||||
|
|
||||||
|
params.push(this.password);
|
||||||
|
params.push(this.selectedActions);
|
||||||
|
|
||||||
|
$wire[methodName](...params)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
if (result === true) {
|
if (result === true) {
|
||||||
this.modalOpen = false;
|
this.modalOpen = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue