mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
feat: set the edge as the data source to achieve two-way linkage betw… (#1299)
### What problem does this PR solve? feat: set the edge as the data source to achieve two-way linkage between the edge and the to field. #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -11,10 +11,7 @@ const DynamicCategorize = ({ nodeId }: IProps) => {
|
||||
const updateNodeInternals = useUpdateNodeInternals();
|
||||
const form = Form.useFormInstance();
|
||||
const options = useBuildCategorizeToOptions();
|
||||
const { handleSelectChange } = useHandleToSelectChange(
|
||||
options.map((x) => x.value),
|
||||
nodeId,
|
||||
);
|
||||
const { handleSelectChange } = useHandleToSelectChange(nodeId);
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -64,7 +61,9 @@ const DynamicCategorize = ({ nodeId }: IProps) => {
|
||||
<Select
|
||||
allowClear
|
||||
options={options}
|
||||
onChange={handleSelectChange}
|
||||
onChange={handleSelectChange(
|
||||
form.getFieldValue(['items', field.name, 'name']),
|
||||
)}
|
||||
/>
|
||||
</Form.Item>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user