xotahal / react-native-material-ui

Highly customizable material design components for React Native
MIT License
3.78k stars 611 forks source link

BottomNavigationAction disabled with more features #517

Closed AminSafari207 closed 1 year ago

AminSafari207 commented 1 year ago

Hi, I'm using React js and according to an issue here, navigation action can be disabled by disabled prop, but what i need here is to have the button disabled but also clickable. I have my snackbar ready to pop up and say this feature is not available, but also need relevant navigation action to be disabled. What should i do now? because if not disabled, the selected action would have animations, color change, touch ripple and like these. Thanks.

AminSafari207 commented 1 year ago

Hi, I'm using React js and according to an issue here, navigation action can be disabled by disabled prop, but what i need here is to have the button disabled but also clickable. I have my snackbar ready to pop up and say this feature is not available, but also need relevant navigation action to be disabled. What should i do now? because if not disabled, the selected action would have animations, color change, touch ripple and like these. Thanks.

Actually found a way! First i got the intended navigation action by id using js dom function, then removed "disabled" attribute from it and removed "Mui-disabled" from its classList. Now it is disabled but also can have a click event listener!