Estoy tratando de crear una vista de desplazamiento de height fija desde un botón de selección, con la que se podrá desplazar. Aunque parece que no puedo hacer que el desplazamiento funcione dentro de un componente View .
Tengo el siguiente componente:
<MyInput key={name} type={'select'} rightIcon={rightIcon} placeholder={"Some"} onChangeText={onChangedText} onInputFocus={onShowDropdown} dropdown={active && options.length > 0 && ( <styled.Dropdown> <styled.Options keyboardShouldPersistTaps='handled' scrollEnabled={(options.length > 3)} showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} horizontal={false}> {options.map((item) => ( <Option key={item.id || item.text} title={item.place_name || item.text} selected={(item.id === highlighted) || (item.text === highlighted)} onHideUnderlay={() => onHideUnderlay(item.id || item.text)} onShowUnderlay={() => onShowUnderlay(item.id || item.text)} onPressed={() => onSelectOption(item)} /> ))} </styled.Options> </styled.Dropdown> Cuando </styled.Dropdown> la Lista funciona bien, pero no tendrá una altura fija.
Estos son los estilos:
styles.Dropdown = styled.View` position: absolute; left: 0; right: 0; top: 51px; z-index: 30; background-color: ${Colors.white}; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12); min-height: 56px; max-height: 168px; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; ` styles.Options = styled.ScrollView` flex: 1; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; ` styles.Option = styled.TouchableHighlight`` Así es como se renderiza (con el código completo), pero no permite hacer scroll y la selección no funciona: 
Así es como se renderiza sin el <styled.DropDown> y funciona, pero sin una altura fija: 
OBS: IOS funciona bien, Android no funciona