-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/downshift select #620
Conversation
022ac21
to
384c730
Compare
b36f3f1
to
0dca21a
Compare
38f3172
to
bed9227
Compare
There's an issue here that moves the cursor to the end of the input whenever the input is changed. This effectively prevents the user from editing anything in the middle of the input. This is a known, unsolved problem with downshift:
|
I tried making the async example more useful by accessing a public API, but I ran into CORS issues:
|
2af4c80
to
54ba8d1
Compare
4 commits are very less for this PR haha. Would have been easier to review by every commit. 🤔 |
Yeah I know, but it wasn't really possible for me. There was almost no incremental work here. Either it worked or it didn't. Also this was very exploratory for me. Just look at the final code. |
The name of |
Problem: As a user, I cannot delete the input value from the middle. |
I think we can consider adding the following test cases:
|
// This is the type for the 'components' prop on the Select. Using | ||
// ComponentType allows us to take in any kind of component, e.g. class | ||
// components, functional components or styled components. | ||
export interface Components { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should have a separate file for all these types?
Then Select.tsx
can only have the Select component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only around 30 lines of code for the types. I don't think that would make it easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh not because of the number of lines of code. It might be a personal preference I guess. It helps in separating the responsibility of files. The types are kept in a separate file.
Something that can be decided for standardization of the codebase later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see!
Actually I don't like separating stuff by "type" so much ^^ I think it's better to organize things logically, in modules. Like we're doing on an app level, with the module folders, where we've tried to move away from the whole "reducers", "selectors", "actions" and whatnot-folders.
See comment further up. |
@westwood846 the code looks good. Thanks for all the storybook examples, they are like a good documentation to go through all the functionalities. There are a couple of warnings, can be fixed before merging. |
d75210f
to
5c36ad0
Compare
Closes #588
Progress is being tracked here: https://docs.google.com/document/d/18yPN0s17_vhNbIBPBHfQ0zFRtIGn81icPtAwVEmZeBE/edit