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
Open
Add prop for setting a fixed height for the dropdown#5davidsharp wants to merge 7 commits intosilesky:masterfrom
davidsharp wants to merge 7 commits intosilesky:masterfrom
Conversation
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.
Owner
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)