-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inside the render content when clicking custom made button it closes the story model #91
Comments
Can you send me what is you logic in deleteStory function? |
My recommendation for you is something like this: (it worked for me)
|
Thanks but can you suggest any other code suggestion as this one i understood but i dont want to add the data in useState. |
Oh, right, I think you could use modalRef.current?.setStories(). So basically as a prop to component you will give default stories and then you can set the new ones (filtered after delete) with modalRef.current?.setStories(...). I think it should work the same way. If it doesn't work, I will think about adding new method to delete story. |
Hello, did it help or is there something needed from my side? |
Can Suggest other way of doing this if possible |
I can't think of any other solution |
maybe you can detect in renderContent any action method like onPress if dispatched than not to close the stories modal. `
}; ` |
Inside the renderContent of the block when rendering the stories , I have made a custom button when clicked to delete a specific story. The issue is when i click it makes the story model close . Can you suggest me solution i want to be on the same story page when i am deleting it . following is my code
` if (AllStoriesPosts && AllStoriesPosts.length > 0) {
InstaStories = AllStoriesPosts.map((story) => ({
id: story.id,
name: story.name,
imgUrl: story?.imgUrl,
}`
the following is my custom made buttton inside "storyContent"
const storyContent = (item, user_id) => { return ( <View style={tw
mt-[25%] flex-row justify-between w-full p-3}> <Text style={tw
font-bold mx-2 text-base text-white}> {item?.description} </Text> {auth.isAuth && auth.body._id == user_id && ( <View> <TouchableOpacity key={item.id} onPress={() => deleteStory(item.id)} style={tw
flex-row justify-start} > <Ionicons size={imageSizes.sm} color={tw.color(
text-red-400)} name={"trash"} style={tw
mx-3 `}/>
};
`
The text was updated successfully, but these errors were encountered: