Giter VIP home page Giter VIP logo

Comments (6)

nysamnang avatar nysamnang commented on July 4, 2024

@kabitacode Please kindly check out the example code.

from react-native-raw-bottom-sheet.

kabitacode avatar kabitacode commented on July 4, 2024
<RBSheet
          ref={ref => {
            this.RBSheet = ref;
          }}
          height={300}
          duration={250}
          customStyles={{
            container: {
              justifyContent: "center",
              alignItems: "center"
            }
          }}
        >
        
<View>
    <View style={{ flex: 1, marginHorizontal: 10, marginTop: 10 }}>
        <View style={styles.assetContainer}>
            <View style={[styles.asset, { width: 100 }]}>
                <Text style={{ fontSize: 15, color: theme.DEFAULT_COLOR, ...systemWeights.bold }}>Pilih Asset</Text>
            </View>
            <View style={{ flex: 4 }}>
                <Picker selectedValue={this.state.selectedValue} onValueChange={(itemValue, itemIndex) => this.setState({ selectedValue: itemValue })}>
                    <Picker.Item value='Pilih Asset' label='Pilih Asset' />
                    {
                        data_peralatan.map((i, ctx) => {
                            return (
                                <Picker.Item value={i.id_asset_peralatan} label={i.nama_asset_peralatan} />
                            )
                        })
                    }
                </Picker>
            </View>
        </View>
    </View>
    <View style={{ flexDirection: 'row', marginHorizontal: 10, marginTop: 10 }}>
        <View style={{ padding: 5, paddingVertical: 15, width: 100, backgroundColor: theme.BG_PRIMARY_COLOR, alignItems: 'center', borderTopLeftRadius: 25, borderBottomLeftRadius: 25, justifyContent: 'center' }}>
            <Text style={{ fontSize: 15, color: theme.DEFAULT_COLOR, ...systemWeights.bold }}>Jumlah</Text>
        </View>
        <View style={{ flex: 1, flexDirection: 'row' }}>
            {/* <TextInput editable={false} underlineColorAndroid='transparent' value={this.state.count} onLayout={(count) => this.setState({ count: count })} keyboardType={'numeric'} style={{ flex: 1, paddingLeft: 10, borderWidth: 0.7, borderColor: '#e0e0e0', borderTopRightRadius: 25, borderBottomRightRadius: 25 }} /> */}
            <View style={{ alignItems: 'center', justifyContent: 'space-between', borderWidth: 1, borderColor: '#e0e0e0', flex: 1, flexDirection: 'row' }}>
                <View style={{ paddingLeft: 10 }}>
                    <Text>{this.state.count}</Text>
                </View>
                <View style={{ backgroundColor: '#e0e0e0', paddingHorizontal: 5, height: '100%' }}>
                    <TouchableOpacity onPress={this.plus}>
                        <Icon name='chevron-up' size={20} />
                    </TouchableOpacity>
                    <TouchableOpacity onPress={this.minus}>
                        <Icon name='chevron-down' size={20} />
                    </TouchableOpacity>
                </View>
            </View>
        </View>
    </View>
    <View style={{ flexDirection: 'row', marginHorizontal: 10, marginTop: 10, }}>
        <View style={{ padding: 5, paddingVertical: 15, width: 100, backgroundColor: theme.BG_PRIMARY_COLOR, alignItems: 'center', borderTopLeftRadius: 25, borderBottomLeftRadius: 25, justifyContent: 'center' }}>
            <Text style={{ fontSize: 15, color: theme.DEFAULT_COLOR, ...systemWeights.bold }}>Satuan</Text>
        </View>
        <View style={{ flex: 1, flexDirection: 'row' }}>
            <TextInput value={this.state.satuan} onChangeText={(satuan) => this.setState({ satuan })} style={{ flex: 1, paddingLeft: 10, borderWidth: 0.7, borderColor: '#e0e0e0', borderTopRightRadius: 25, borderBottomRightRadius: 25 }} />
        </View>
    </View>
    <View style={{ alignItems: 'center', marginTop: 10, marginHorizontal: 15, justifyContent: 'center', paddingVertical: 5 }}>
        <Select2
            isSelectSingle={false}
            style={{ borderRadius: 5 }}
            colorTheme={theme.BG_PRIMARY_COLOR}
            popupTitle="Cari Pegawai"
            title="Tujuan Penerima"
            cancelButtonText='Batal'
            selectButtonText='Ok'
            searchPlaceHolderText='Cari Pegawai'
            listEmptyTitle='Data Tidak Ada'
            data={this.state.dataPegawai}
            onSelect={(data) => {
                var data_asigne = [];
                data.map((item) => {
                    data_asigne.push({ id: item });
                })
                console.log('data dari select:', data_asigne);
                this.setState({ data: data_asigne });
            }}
            onRemoveItem={(data) => {
                var data_asigne = [];
                data.map((item) => {
                    data_asigne.push({ id: item });
                })
                this.setState({ data: data_asigne });
            }}
        />
    </View>
    <View style={{ marginHorizontal: 15, marginTop: 10 }}>
        <TextInput value={this.state.keterangan_pegawai} onChangeText={(keterangan_pegawai) => this.setState({ keterangan_pegawai })} placeholder='Keterangan' multiline={true} style={{ paddingLeft: 10, borderWidth: 1, borderColor: '#e0e0e0' }} />
    </View>
    <View>
        <Button mode='contained' style={styles.btnAdd} onPress={() => this.postAddPerBarang()}>
            <Text>Submit</Text>
        </Button>
    </View>
</View>
        </RBSheet>

from react-native-raw-bottom-sheet.

nysamnang avatar nysamnang commented on July 4, 2024

@kabitacode Do you want to swipe bottom sheet up to show contents full screen like Google Map right?

from react-native-raw-bottom-sheet.

kabitacode avatar kabitacode commented on July 4, 2024

Yes, totally correct

from react-native-raw-bottom-sheet.

nysamnang avatar nysamnang commented on July 4, 2024

@kabitacode currently it's not possible to achieve this behaviour, sorry for inconvenient. Anyway, I'll consider implementing this in the future.

from react-native-raw-bottom-sheet.

kenkotch avatar kenkotch commented on July 4, 2024

@nysamnang I too would love to see this functionality.

from react-native-raw-bottom-sheet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.