zaichaopan / react-aria-components-tailwind-starter

Tailwind react aria components starter kits
https://zaichaopan.github.io/react-aria-components-tailwind-starter
MIT License
29 stars 4 forks source link

Possible issue with MultiSelect.tsx #5

Closed gregmsanderson closed 3 months ago

gregmsanderson commented 3 months ago

Hello,

I'm seeing an error in MultiSelect.tsx that says Module '"./TagGroup"' declares 'TagList' locally, but it is not exported.

It seems that is because MultiSelect.tsx is trying to import it from TagGroup.tsx, here:

https://github.com/zaichaopan/tailwind-react-aria-components-starter-kits/blob/9f7913733d6433513cd689a2eb9bda0f86ba34f7/src/MultiSelect.tsx#L25

Should it instead get it directly from RAC?

import { TagGroup } from "./TagGroup";
import { TagList } from "react-aria-components";

I could add a PR but you may be aware of it and/or prefer to instead export it from TagGroup.

Thanks.

zaichaopan commented 3 months ago

I made a change to reuse the TagGroup and TagList component. So probably missed the export. The issue should be fixed now. Please let me know if you still see the error.

React Aria does not suport multi select comboBox. I don't want to install another lib like https://github.com/JedWatson/react-select/tree/master which will increase the bundle size a lot. The current implementation is mainly based on the github disucssion https://github.com/adobe/react-spectrum/issues/2140. Let me know if you have any suggestions. Thanks

gregmsanderson commented 3 months ago

No problem. I agree adding in extra libraries beyond the React Aria family is not good.

The added export from TagGroup does indeed fix it, thanks :)