import { Divider, Input } from 'antd'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { useCollectionManager } from '../collection-manager'; export const SelectCollection = ({ value, onChange, setSelected }) => { const { t } = useTranslation(); const { collections } = useCollectionManager(); return (
{ const names = collections .filter((collection) => { if (!collection.title) { return; } return collection.title.toUpperCase().includes(e.target.value.toUpperCase()); }) .map((item) => item.name); setSelected(names); onChange(e.target.value); }} />
); };