fix: list-input, labels-selector form

This commit is contained in:
jialin
2026-04-29 18:09:55 +08:00
committed by jialin
parent 3144328874
commit 217285223c
10 changed files with 5 additions and 82 deletions
-8
View File
@@ -5,14 +5,8 @@ import _ from 'lodash';
import { FormData } from '../config/types';
const LabelsForm: React.FC = () => {
const form = Form.useFormInstance();
const labels = Form.useWatch('labels', form);
const intl = useIntl();
const handleLabelsChange = (labels: object) => {
form.setFieldValue('labels', labels);
};
return (
<Form.Item<FormData>
name="labels"
@@ -44,9 +38,7 @@ const LabelsForm: React.FC = () => {
label={intl.formatMessage({
id: 'resources.table.labels'
})}
labels={labels}
btnText={intl.formatMessage({ id: 'common.button.addLabel' })}
onChange={handleLabelsChange}
></LabelSelector>
</Form.Item>
);