fix(WFE): properly set inital status

The operationComponent.value is only possibly available with registered
operations that have the value prop. Ones that do not would not have the
value set properly initially. Going to inputValue, which is mapped to the
components model-value, solves this.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pull/52528/head
Arthur Schiwon 2025-04-29 12:23:27 +07:00 committed by backportbot[bot]
parent e08ffe2187
commit 08a6758f52
1 changed files with 1 additions and 3 deletions

@ -31,7 +31,6 @@
<Operation :operation="operation" :colored="false">
<component :is="operation.element"
v-if="operation.element"
ref="operationComponent"
:model-value="inputValue"
@update:model-value="updateOperationByEvent" />
<component :is="operation.options"
@ -136,9 +135,8 @@ export default {
},
mounted() {
this.originalRule = JSON.parse(JSON.stringify(this.rule))
if (this.operation?.element) {
this.$refs.operationComponent.value = this.rule.operation
this.inputValue = this.rule.operation
} else if (this.operation?.options) {
// keeping this in an else for apps that try to be backwards compatible and may ship both
// to be removed in 03/2028