Skip to content

Commit

Permalink
sq
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaiir committed Sep 2, 2024
1 parent 2b3f0b5 commit 9678d9c
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { get, set } from 'min-dash';
import { useService, useVariables } from '../hooks';

import { FeelEntry, isFeelEntryEdited } from '@bpmn-io/properties-panel';
import { useCallback } from 'preact/hooks';
import { useCallback, useMemo } from 'preact/hooks';

export function CustomValidationEntry(props) {
const { editField, field, idPrefix, index } = props;
Expand Down Expand Up @@ -36,7 +36,10 @@ function Condition(props) {
const debounce = useService('debounce');
const _variables = useVariables();

const variables = [{ name: 'value', info: '*Current field value*' }, ..._variables];
const variables = useMemo(
() => [{ name: 'value', type: 'keyword', info: 'Returns the current field value.' }, ..._variables],
[_variables],
);

const setValue = (value, error) => {
if (error) {
Expand Down Expand Up @@ -79,7 +82,10 @@ function Message(props) {
const debounce = useService('debounce');
const _variables = useVariables();

const variables = [{ name: 'value', info: '*Current field value*' }, ..._variables];
const variables = useMemo(
() => [{ name: 'value', type: 'keyword', info: 'Returns the current field value.' }, ..._variables],
[_variables],
);

const setValue = (value, error) => {
if (error) {
Expand Down

0 comments on commit 9678d9c

Please sign in to comment.