Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Add prop for setting a fixed height for the dropdown#5

Open
davidsharp wants to merge 7 commits intosilesky:masterfrom
davidsharp:dropdown-height
Open

Add prop for setting a fixed height for the dropdown#5
davidsharp wants to merge 7 commits intosilesky:masterfrom
davidsharp:dropdown-height

Conversation

@davidsharp
Copy link

Using this we can restrict the height of the dropdown box, without setting a fixed height for component as a whole, meaning we can both render over components below, but also limit the ListView to be scrollable.

(Exists off the back of my previous PR #4)

Leveraging the existing `react-native-autosuggest` code to allow typeahead for more complex objects

This first pass takes objects with a `searchableID` property and takes a string format function to display it, while still accepting string terms.
This way we can show the 'term' if it's found by that, but the ID if we've found it specifically by the ID. This way we're not just displaying an ID because there is one, and it better aids messaging regarding _how_ it was found to the user.
Includes an example based on the original example
The ListView styles are all hard-coded, so this adds something slightly opinionated styles to make it a bit nicer.

This should _definitely_ be offered as a prop.
@silesky
Copy link
Owner

silesky commented Dec 24, 2017

Hey, would you be able to break this 'fixed height for the dropdown' feature into a separate PR (one that is distinct from the searchable ID feature?).

If not, you can close this PR and I can implement this feature by myself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants