-
Notifications
You must be signed in to change notification settings - Fork 55
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
fix(components/typeahead): use a flag for the display mode #1101
fix(components/typeahead): use a flag for the display mode #1101
Conversation
…g_for_the_display_mode
function Typeahead({ onToggle, icon, position, ...rest }) { | ||
if (onToggle) { | ||
function Typeahead({ onToggle, icon, position, docked, ...rest }) { | ||
if (docked === true && onToggle) { |
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.
if (!!docked && onToggle)
const wrapper = renderer | ||
.create(<Typeahead {...props} />) | ||
.toJSON(); | ||
const wrapper = renderer.create(<Typeahead {...props} />).toJSON(); |
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.
where are the snap?
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.
Why would you want to see it modified by this test ?
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.
Dunno, right.
…g_for_the_display_mode
const wrapper = renderer | ||
.create(<Typeahead {...props} />) | ||
.toJSON(); | ||
const wrapper = renderer.create(<Typeahead {...props} />).toJSON(); |
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.
Dunno, right.
…g_for_the_display_mode
…g_for_the_display_mode
What is the problem this PR is trying to solve?
The only way to display the typeahead input when using the toggle functionnality is to delete the
onToggle
property, which is obviously a bad thing.What is the chosen solution to this problem?
Add a
docked
property.Please check if the PR fulfills these requirements
[x] This PR introduces a breaking change