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>
This commit is contained in:
Arthur Schiwon 2025-04-29 12:23:27 +02:00 committed by backportbot[bot]
parent 08140736d3
commit ebed9a5423

View file

@ -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