Open Dror-Bar opened 6 years ago
I also was experiencing this bug. I found a simple workaround: wrap all children components in a View and give it the desired style. It worked fine to me.
Interesting, I thought I tried that but I'll give it another go.
Hello guys is there any solution? I tried the wrapping children components in View but it did not work. Thanks in advance.
@therise3107 While I haven't tried it myself yet, you could probably achieve something like this with the built-in method renderRow. The method gives you complete control on how the dropdown is going to look. For example:
<ModalDropdown options={this.state.options} renderRow={this._renderRow} onSelect={this._onSelect} />
And add the method:
_renderRow(rowData, rowID, highlighted) {
return (
<View style={styles.row}>
{more stuff here...}
</View>
);
}
Is there a way to give the ModalDropdown flexDirection: 'row' style? I want it to contain a row of items rather than a column.