Skip to content

Commit

Permalink
fix(client): fix tag set bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Gezq committed Mar 6, 2024
1 parent 78e92f3 commit 4b02103
Showing 1 changed file with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,23 +403,15 @@ const WidgetSchema: FC<Props> = ({ form, path, value, isCheck }) => {
function onTypeChange(type: VariableValueType) {
setValueType(type);

const variables = form.getFieldValue('variables');

set(variables, `[${variableIdx[0]}].value_type`, type);

form.setFieldsValue({
variables,
});
const result = { variables: form.getFieldValue('variables') };
set(result, `[${variableIdx[0]}].value_type`, type);
form.setFieldsValue(result);
}

function onTagChange(tag: string) {
const variables = form.getFieldValue('variables');

set(variables, `[${variableIdx[0]}].tag`, tag);

form.setFieldsValue({
variables,
});
const result = { variables: form.getFieldValue('variables') };
set(result, `[${variableIdx[0]}].tag`, tag);
form.setFieldsValue(result);
}

function onComponentChange(val: VariableComponent) {
Expand Down

0 comments on commit 4b02103

Please sign in to comment.