octopitus / rn-sliding-up-panel

Draggable sliding up panel implemented in React Native https://octopitus.github.io/rn-sliding-up-panel/
MIT License
928 stars 157 forks source link

Is there any way to embeb a view into sliding ? #163

Open anhhtz opened 4 years ago

anhhtz commented 4 years ago

Is there any way to embeb a view into sliding ?

I have a full view (MenuView.js) want to embed into Sliding but it seem not shows up:

MainView.js

import MenuView from ...

<SlidingUpPanel ref={c => this._panel = c}>
    <View style={styles.panelContainer}>
        <Text>Here is the content inside panel</Text>
        <View style={{ height: 400, }}>
            <MenuView />
        </View>
        <Button title='Hide' onPress={() => this._panel.hide()} />
    </View>
</SlidingUpPanel>

MenuView.js

export default class MenuView extends BaseView {
    constructor(props) {
        // constructor
    }

    // componentDidMount()

    render() {
        return(
            // View
            // FlatList
            //...
        )
    }
}