Comments (60)
will work on the basic example
from downshift.
I'll start with an Apollo example
from downshift.
Some more inspo:
I'm going to try and do one like above this weekend.
from downshift.
@kentcdodds I've got a WIP example of a date picker built with Downshift: https://codesandbox.io/s/nwk52x9qo0
I have a few tweaks I'd like to make, but is there anything in particular you want me to clean up before I submit a PR?
from downshift.
I could work on a Spectre.css example.
That would be amazing! Let's do it!
from downshift.
Hi @kentcdodds
I am going to make example with material
style
from downshift.
I can setup and example with axios and GitHub search API
from downshift.
Going to get familiar with the existing code by making an example using our web API ;)
from downshift.
I have just learned we recently auth_token
'd the last of our (previously) open endpoints. 😞
Will come up with another example.
from downshift.
Going to try an example like this soon
source
from downshift.
from downshift.
sounds great 👌 also, I might take a stab at the Twitter example this weekend 😉
from downshift.
genie
looks fun. I will have a go over the weekend. 😄
from downshift.
I've updated the Examples
section. Please make a PR to that section when you've made your example.
from downshift.
Hey everyone! 👋
~/Developer/downshift (master)
🏎 $ npm publish --tag rc
+ [email protected]
I need your help now! The library now has 100% code coverage and is ready to move forward! The first release candidate has been released. I think that the API is solid now and I'd love some feedback on things. Please build some examples and let me know what could be improved!
Please install the latest rc
:
npm install downshift@rc
Or fork this codesandbox and create your own examples! Thanks!
from downshift.
sure I will update example & do some more :). Good job @kentcdodds !!!
from downshift.
@kentcdodds sent a PR #157 with new examples 😄
from downshift.
is the intention here to implement the examples in the react-autocomplete repo (Async, static data etc.) using autocompletely instead?
What would be amazing would be to basically recreate a component that simulates their API using react-autocompletely, then to copy their examples directly if possible.
from downshift.
I could work on a Spectre.css example.
Or would we strictly be sticking with JS/React autocomplete implementations? (the Spectre component is CSS-only)
from downshift.
How do you feel about a Dropdown as well as a Select? Maybe even a name change could help open up more possibilities? I feel like there is a lot of other potential here. Here are some examples I started sketching out. Let me know what you think and I would be happy to submit a PR.
This may be jumping the gun.. but what if this repo had a packages
folder that we could stuff these components in and publish to NPM?
from downshift.
Happy to entertain a name change in another issue.
You're right, maybe we should user lerna here. I've never used it before, but this seems like a great use case!
from downshift.
Sorry, pressed the wrong button there 😄
How do you see the react-select example? Do you mean displaying them side-by-side to compare the difference in API's? I've used react-select a lot, so that would be a nice one for me to start with.
from downshift.
Ok I will do examples
from downshift.
How do you see the react-select example? Do you mean displaying them side-by-side to compare the difference in API's? I've used react-select a lot, so that would be a nice one for me to start with.
Not side-by-side. If someone wants to see them side-by-side they can open up another tab (we could even provide a link). But making that example page look identical to the react-select example page would be pretty cool.
from downshift.
@nndung179,
Ok I will do examples
Which example will you work on? We want to avoid people working on the same thing.
from downshift.
@kentcdodds cool! Will give it go this weekend. Would you be okay with giving some feedback when the first example is done so that I know that I'm going in the right direction?
from downshift.
Absolutely. Thanks @Corjen!
from downshift.
Fantastic 🎉
from downshift.
Hey folks! 👋 now that we've released a beta version, it's much easier to make examples. Now you can make them right in the browser 🎉 (thank you @CompuIves!!!)
So, if you've made an example already, would you mind forking this example: http://kcd.im/rac-example and updating it to your example? Then give it a good title and description and add the react-autocompletely:example
tag That way it shows up in this search
I'll add a link to that in the README so folks can go see all the awesome examples you all make. Thanks!!!
from downshift.
If anyone has any ideas for examples but are hard pressed on time, I'd love to pick those up.
from downshift.
Here are some ideas. Try reimplementing components from the following libraries:
- semantic-ui
- react-autocomplete
- react-select (I think someone may be working on this one)
I expect there are others... :)
from downshift.
I can work on this: https://reactcommunity.org/react-autocomplete/managed-menu-visibility/ if no one already is.
from downshift.
Sounds great 👍
from downshift.
@kentcdodds For future examples, do you prefer for them to be in code sandbox only or do you also want them here? Downside to code sandbox is that some examples might get out of sync as the API changes if their original authors don't update them.
from downshift.
@jtmthf, good point. Though we're in the same situation either way...
It might be better to have a specific curated list that we as maintainers can manage. I wonder if @CompuIves could eventually add the idea of "Collections" and we could link to a collection of examples 🤔
For now, let's just do everything in codesandbox, and maybe we can add a list of links to the README and keep that up to date ourselves.
from downshift.
If someone wants to do that I'm fine, but I think that long-term collections would be better so I'm happy to manually maintain a list on the repo until collections exist 😄
from downshift.
Are you cool with leaving Next in there or some sort of way to test out examples in a dev environment? I found it helpful when changing API's and what not so I could test real quick.
from downshift.
Who wants to make this with react-autocompletely? 😄
from downshift.
Are you cool with leaving Next in there or some sort of way to test out examples in a dev environment? I found it helpful when changing API's and what not so I could test real quick.
Yes, we can do it for that purpose 👍 Though maybe we should clean it up to only have a few. And we should update the README to indicate the new purpose of that project.
from downshift.
Another fun one would be to make an implementation of genie
with react-autocompletely
. Right now the demo is using angular 😉 I always wanted to add a "genies lamp" for react.
from downshift.
There's been some breaking changes released. I've updated kcd.im/rac-example with the latest 😄 Thanks everyone!
from downshift.
@kentcdodds could I use styled-component
to develop component style?
from downshift.
Definitely. The example I liked to uses glamorous. You could just switch it to styled-components 😀
from downshift.
I am really sorry, I won't be able to complete the genie example this weekend as something has come up 😞 Genie
looks great and if anyone wants to pick it up please feel free to do it.
from downshift.
@kentcdodds You want us to update the README? I have my SpectreCSS example (here)
Note: I was having some trouble with the Autocomplete.Menu
component, so I copied the files from the /examples
directory in the repo to get it working.
from downshift.
Hey @geoffdavis92! Thanks for this! It looks like you're not using the latest react-autocompletely@beta but instead using a specific file in your sandbox. Would you be interested in updating it to the latest beta and adding it to the dependencies? (You can fork this)
from downshift.
@kentcdodds Sure thing, just updated. But it gives me an invariant violation. It doesn't seem to like the Autocomplete.Menu
item.
from downshift.
That was removed. Sorry, things change a lot around here until 1.0.0 is released. See the docs (use the controller). Thanks for any API feedback/help you can give us!
from downshift.
@kentcdodds Got it working. Do you allow non-contributors to edit the README? Otherwise my example link is here: https://www.codesandbox.io/s/M89KQOBRB
from downshift.
Thanks! Yes, please open a pull request to the README 😀
from downshift.
There's been a significant update! I've updated the README the base example.
Please give it a spin! I'm really excited about the flexibility of the new API! Thank you @jaredly for the inspiration here 🎉
from downshift.
@kentcdodds great progress, love the new API! 🎉 Couldn't find the time this weekend, but just finished with the first react-select example, see https://codesandbox.io/s/JEKJXDJK
I only need to find a way to clear the input when the items prop changes, do you have any ideas on that? Also, would love some feedback!
from downshift.
Hey @kentcdodds,
Is that the expected behaviour to get isOpen
from getInputProps
and pass it to the component?
Love the new API! Great work! I have found it much much easier compared to the previous one as I gave a shot at Genie with the old one and it took me much more time to configure compared to now.
PS: your codesandbox example is tagged with react-kadabra
😄
from downshift.
I've made an example here. Its based on material ui, thought it is a bit different from the existing material-ui example.
As soon as I get some clarity about how to clear selection (correctly), I'd like to submit that to the existing examples.
from downshift.
Hey folks around here! There was a minor breaking change. Before the onChange
handler accepted an object with a selectedItem
property, now it is just passed the selectedItem
property. See the README 😄
~/Developer/downshift (master)
🏎 $ npm publish --tag rc
+ [email protected]
from downshift.
Hi @kentcdodds 👋 , to help better understand the downshift API I built a redux
version here: https://codesandbox.io/s/0o0w70lp8p does this look ok? I tried to keep it simple but also have some organization.
from downshift.
That's great @agirton! Could you add it to the list of examples in the README? Thank you!
from downshift.
OH WOWOWOWOWOWOWOWOWOW!! That's super awesome!
I'm amazed at how simple it is!
I think it could use some fancy styling. Also, if I could change the month/year for the available selection that'd probably be good too, but this is super cool. Thanks @MPLIS!
from downshift.
we can't do thread to respond, that's a shame, i don't want to flood the conversation too much.
@MPLIS, maybe we could use okami to build the date picker with Downshift.
okami already use date-fns to handle date so must be pretty easy to implement :)
I don't know if that could be a simpler thing but maybe it's worth looking into it :)
really quick try here : https://codesandbox.io/embed/m7wrq8lj0y
from downshift.
I still want examples, but I'm trying to clean things up so I'm going to close this issue.
Thanks everyone!
from downshift.
Related Issues (20)
- manually triggering toggleMenu is not working well with toggle button blur HOT 1
- Selected item is not updated in mobile devices HOT 5
- Multi-select useCombobox: VoiceOver bug when deselecting item HOT 1
- Select element doesn't receive focus when the label is clicked. HOT 1
- get{Any}Props functions do not play nicely with TypeScript and React Native HOT 4
- Bug on responsive mode Mobile HOT 1
- Getting React Downshift to work nicely with react-virtualized? HOT 1
- Clicking the same item twice does not toggle the selected item in combobox HOT 8
- Document focus reset to body element when menu is open and combobox is tabbed away from (Firefox only) HOT 1
- CodeSandbox examples broken? HOT 2
- Is it normal for no downshift event to fire on input focus? HOT 3
- useComboBox always grabbing focus on render HOT 4
- [discussion] items is initially empty array in useCombobox HOT 3
- Highlighting is Inconsistent on Toggle Button using `useSelect` HOT 2
- defaultHighlightedIndex will select disabled items HOT 1
- v10
- Is it possible to use JS to set the value of a React + downshift autocomplete dropdown? HOT 1
- Errors in `typings/index.d.ts`
- Select / highlight first item, that is not disabled when using arrow keys to open the menu
- Screen readers read out object code when using useMultipleSelection hook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from downshift.