Skip to content
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

No clear way to make the "Search" component fill the width of its container #1381

Closed
tashburn opened this issue Feb 24, 2017 · 4 comments
Closed

Comments

@tashburn
Copy link

The problem

The "input" property suggests it could somehow be set to make the component fill its container. But it's unclear what that setting would be (), and I don't see it doing anything in the code either.

What I want

The existing "fluid" property () makes the search results fill the container, not the input field itself. That's an inconsistent meaning for the property "fluid", which is used in other components to make the component itself fill the width of its container. I propose that make the component fill its container's width, and make the search results fill it's container width. That's more consistent and clearer to use.

Possible solution

It seems that a Search component property (like repurposing "fluid") just needs to be passed as the Input property "fluid" in the renderSearchInput function.

Version

2.2.2

@levithomason
Copy link
Member

Duplicate #1104

<Search input={{ fluid: true }} />

@levithomason
Copy link
Member

levithomason commented Feb 24, 2017

Sidenote, looks like you need to use some backticks ` around your code when commenting. Otherwise, GitHub tries to render it as HTML.

<strong>Like this</strong> instead of like this.


@tashburn
Copy link
Author

Thanks for the suggestion on the backticks. I'm glad there's an existing solution for this. I'd suggest updating the documentation for the Search component's input property to make this clearer -- something like: "Pass properties to the input component (e.g. input={{ fluid: true }})"

@levithomason
Copy link
Member

levithomason commented Feb 25, 2017

Yep, PRs welcome! There are a lot of great ideas lying around here waiting for willing and able hands :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants