Comments (6)
@kabitacode Please kindly check out the example code.
from react-native-raw-bottom-sheet.
<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.
@kabitacode Do you want to swipe bottom sheet up to show contents full screen like Google Map right?
from react-native-raw-bottom-sheet.
Yes, totally correct
from react-native-raw-bottom-sheet.
@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.
@nysamnang I too would love to see this functionality.
from react-native-raw-bottom-sheet.
Related Issues (20)
- Touch events not working on IOS simulator HOT 4
- Add statusBarTranslucent on Modal HOT 3
- How to mock the react-native-raw-bottom-sheet ?? HOT 7
- Background Overlay is not available HOT 2
- RBSheet takes too long to open first time HOT 1
- Toast when bottom sheet is open HOT 3
- Default Opening HOT 2
- how to make other Component front of rbsheet HOT 1
- Please type props with 'PropsWithChildren' HOT 8
- Bottom sheet doesn't open when I re-route to back to its parent component(Homepage) HOT 5
- Flat list item click not working on first click HOT 1
- minClosingHeight is not working
- Open Sheet on the side HOT 1
- How to disable Mask HOT 1
- how to disable dragable icon ?
- how to disable draggableIcon ? HOT 2
- How to use react-native-raw-bottom-sheet in typescript HOT 2
- Property 'children' does not exist on type HOT 3
- Typescript Fix HOT 3
- BackEvent is not firing inside bottomsheet when system default back event is pressed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-raw-bottom-sheet.