So I have my initValue set to a variable that I update when onChange runs. However, if I don't update the value in onChange function -the value in the component's button still updates, even though the tracked variable does not. How can I prevent the value in the components button from updating. Or how exactly can I control it, after the initValue?
I understand that I can use the visible prop to control the menu, and theoretically replace the button provided by the component with another. But, how can I hide the original button provided by the component? Is that better? Is there a real example of that?
Turns out you can just pass whatever you want as the Child of ModalSelector, and that will replace the button provided by the modal, and it will be TouchableOpacity, which satisfies exactly what I need
So I have my
initValue
set to a variable that I update whenonChange
runs. However, if I don't update the value in onChange function -the value in the component's button still updates, even though the tracked variable does not. How can I prevent the value in the components button from updating. Or how exactly can I control it, after the initValue?I understand that I can use the
visible
prop to control the menu, and theoretically replace the button provided by the component with another. But, how can I hide the original button provided by the component? Is that better? Is there a real example of that?