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

[AutoComplete] #4549

Closed
hmeerlo opened this issue Jun 22, 2016 · 7 comments
Closed

[AutoComplete] #4549

hmeerlo opened this issue Jun 22, 2016 · 7 comments
Labels
component: autocomplete This is the name of the generic UI component, not the React module! v0.x

Comments

@hmeerlo
Copy link

hmeerlo commented Jun 22, 2016

Description

Can not set width of dropdown
I want an autocomplete field where the searchfield should be smaller than the contents of the dropdown.

Images & references

screen shot 2016-06-22 at 22 00 21

@finaiized
Copy link

You can set a custom width through listStyle:

<AutoComplete
  listStyle={{
    width: 500,
  }}
  hintText="Type anything"
  dataSource={this.state.dataSource}
  onUpdateInput={this.handleUpdateInput}
/>

@hmeerlo
Copy link
Author

hmeerlo commented Jun 23, 2016

Ah thanx, I will give it a try. It is very hard to find this out at the moment. I really hope the new styling mechanism coming in 0.16 is making this better (but more importantly that it improves the performance because that should be priority 1 for this project in my opinion).

@aahan96
Copy link
Contributor

aahan96 commented Jul 5, 2016

@hmeerlo Were you able to resolve the issue with the solution posted above?

@hmeerlo
Copy link
Author

hmeerlo commented Jul 5, 2016

Yes partially. You cannot set fullWidth to true because then it won't work. That's too bad because I wanted my searchField to be fullWidth of the enclosing div and the dropdown wider than that.

@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@aahan96 aahan96 closed this as completed Aug 16, 2016
@hadasmaimon
Copy link

You can set a custom width through listStyle:

<AutoComplete
  listStyle={{
    width: 500,
  }}
  hintText="Type anything"
  dataSource={this.state.dataSource}
  onUpdateInput={this.handleUpdateInput}
/>

@oliviertassinari is that listStyle props still exist on the autoComplet component?

@hadasmaimon
Copy link

@oliviertassinari what is the alternative of it?

@hadasmaimon
Copy link

@oliviertassinari what is the alternative of it?

This is the alternative:

<AutoComplete
  ListboxProps={{ style: { maxHeight: 200, overflow: 'auto' } }}
...
/>

@oliviertassinari oliviertassinari added the component: autocomplete This is the name of the generic UI component, not the React module! label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! v0.x
Projects
None yet
Development

No branches or pull requests

5 participants