Feat: Add LinkToDatasetDialog #3221 (#4500)

### 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:
balibabu
2025-01-16 11:35:39 +08:00
committed by GitHub
parent 961e8c4980
commit a75cda4957
10 changed files with 267 additions and 45 deletions

View File

@ -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 });