Closed ardhendu12345 closed 2 years ago
@AdelRedaa97 but i have to shown an alert on touch it , if it get disabled then idt should not get touch it ,... actually i have to show an alert when data is empty, but now onFocus i use alert but along with the alert it open its popup with the empty popup with loader ...i just want to show the alert statement but not the empty popup... please help
The thing that is missing in your solution is to close the dropdown after the user pressed ok in the alert right?
No, actually i have three dropdown , if you not select from the first then second one and third one are vacant data , when one user not selecting first, tries to select second then i add onFocus alert to select first one then only able to select second ..but when user direct tries to press seconnd one then then as there is no data it shows blank popup..and the alert simultaneously... i only want to alert user not the blank popup its a bad user experience ...how to do that...i show alert using onFocus() callback function..please help
https://snack.expo.dev/@adelredaa97/b978f0
look at this example and tell me if that is what you want or not.
yes , it is what i want...Thanks...
Try
disabled={data.length == 0}
the dropdown won't be opened.