Closed shekharskamble closed 6 years ago
@shekharskamble
position: 'absolute' and bottom: 0
via dialogStyle
propstate or class variable
. It's not related to this Library. it mostly about React. You could study React's documents.const slideAnimation = new SlideAnimation({ slideFrom: 'bottom' })
<DialogComponent
title="Edit"
titleAlign="left"
dialogStyle={{borderTopLeftRadius:20, borderTopRightRadius:20, position: 'absolute', bottom: 0}}
titleTextStyle={{fontSize:14, fontWeight:'bold', color:'#000'}}
dialogAnimation={slideAnimation}
dialogButton= {<DialogButton text="Close" align='right'/>}
height={300}
ref={(dialogComponent) => { this.dialogComponent = dialogComponent; }}
>
<DialogContent>
<View>
<Text>{this.message}</Text> // tried to user state & class variable but doesnt work
</View>
</DialogContent>
</DialogComponent>
Thanks a lot for speedy reply, I tried to use state variable & class variable inside DialogContent but it doesn't work am I doing something wrong?
You should use component state
Thank you for your reply & sorry to bother you so much, I did try
Ok, what do you mean by doesn't work? nothing display?
Yes it doesn't display the dialog but the overlay gets displayed....
setState asynchronous issue.... resolved it by adding callback function
Nice!
Hi @shekharskamble , i am also facing the same problem, did you find any solution ?
@faizan992 when you setState message in that callback open the dialog
Hi Jack,
Great library, I want to achieve something like this
How can I position the dialog to the bottom of the screen? Also tried to use state & class variable to display message but it doesn't work :(
My Code:
Please help.