tbleckert / react-select-search

⚡️ Lightweight select component for React
https://react-select-search.com
MIT License
676 stars 149 forks source link

v3 release #138

Closed tbleckert closed 3 years ago

tbleckert commented 3 years ago

The upcoming v3 release is mainly a refactoring project to make to code both smaller and more maintainable. It also comes with some important fixes like:

Some of this should also be patched in to v2.

Feel free to discuss it here if you have any ideas. You can also join the private, newly started Slack channel if you like. Send me an email for invitation.

icaroscherma commented 3 years ago

I don't want to sound rude, but how close are to v3? Is there an ETA? I noticed on other issues that a virtualization (react-window or react-virtualized) will be implemented, that's what I was currently working on. This library was the only <select>-like library that I found that's tiny, with proper keyboard events supported (like using arrow keys to navigate through the item list, tabulation not getting inside the list) and it's customizeable enough to change stuff without breaking it. Thumbs up! ;)

About the ajax functionality, I'm not sure yet if it's a good idea to have the whole handling through the react-select-search, there are libraries like react-query that are constantly maintained that have what you guys might need out of the box, perhaps if a good example is provided on the Docs, it's sufficient and no reinventing the wheel is needed.

tbleckert commented 3 years ago

@icaroscherma Not rude at all and thanks for your interest in the project. The v3 release is basically done, just testing and making sure functionality hasn't fallen out.

About ajax and react-query (or swr). It's possible to use them and you're right, might need an example for it. Basically you would use it outside react-select-search and then pass the options to the component (or hook). That way you can also control the disabled state when validating data. Incorporating it in the getOptions callback could also work but a bit trickier.

Good thing you brought it up. Need to think about it as I don't want to add mandatory dependencies to the project.

UnclespaceGroup commented 3 years ago

what with this #125? will this be implemented in this version?

tbleckert commented 3 years ago

@UnclespaceGroup Yes, already implemented and documented https://github.com/tbleckert/react-select-search/tree/next#configuration

federicocappellotto97 commented 3 years ago

Please release it now!! 😂 😂 😂

icaroscherma commented 3 years ago

@tbleckert You're increasing a major version number but are you following SemVer (is there any major deprecations)? I'm about to finish re-styling it and I don't want to have to redo this.

Another nice feature would be "integration" with CSS frameworks (bootstrap, bulma, tailwind), by "integration" I mean examples of how to use specific classes to reflect the native behaviour of that framework, since I'm doing mine with Tailwind, if you're interested I can give a hand on that.

Mine it's currently looking like this: Screen Shot 2020-12-07 at 10 05 39 AM

tbleckert commented 3 years ago

@icaroscherma There won't be any major deprecations. The update/project is only called v3 for now since it's a big refactor. Not sure yet if it can safely be tagged as a v2.3.

Regarding integrations. Feel free to send a PR with some story examples, would be a great addition. Great idea!

icaroscherma commented 3 years ago

@tbleckert I just noticed a bug when you're browsing the component using your keyboard (arrow up and down) and you have multiple={true}, it doesn't scroll up and down following the "hovered" option.

It can be reproduced in your own example: https://react-select-search.com/?path=/story/multiple-select--search

Have you fixed this on your v3 release?

tbleckert commented 3 years ago

Thanks for the report @icaroscherma , wasn't aware of the issue but looks lite it has been fixed. You can browse the stories for the next branch here https://react-select-search-git-next.tbleckert.now.sh/

icaroscherma commented 3 years ago

It's still present to me: https://react-select-search-git-next.tbleckert.now.sh/?path=/story/multiple-select--search

Screen-Recording-2020-12-10-at-9

I think that the highlight cursor it's not triggering the events AFTER your first selected one option.

tbleckert commented 3 years ago

Ah, hm. Yeah, looks like it's working until you select an option. Thanks, will look into it.

manvydasu commented 3 years ago

@tbleckert any plans to rewrite this in typescript?