mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: Add LinkToDatasetDialog #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -72,6 +72,17 @@ export const useFetchKnowledgeList = (
|
||||
return { list: data, loading };
|
||||
};
|
||||
|
||||
export const useSelectKnowledgeOptions = () => {
|
||||
const { list } = useFetchKnowledgeList();
|
||||
|
||||
const options = list?.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.id,
|
||||
}));
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
export const useInfiniteFetchKnowledgeList = () => {
|
||||
const { searchString, handleInputChange } = useHandleSearchChange();
|
||||
const debouncedSearchString = useDebounce(searchString, { wait: 500 });
|
||||
|
||||
Reference in New Issue
Block a user