3mr
3mr

Reputation: 342

how to open a custom modal dialog when clicking on ion-select

I have an ion-select in my app. I want to open a custom dialog box instead of the default dialog box when clicking on the select. This is because , I need to take some extra inputs depending on the selection the user makes. So trying to open a modal when clicking on the select. Is there a way to stop the default dialog being opened when clicking on ion select. Then I can put the select in an ion-col and handle the ion-col's click event to open the new modal. Of course I can achieve this by disabling the ion-select. But disabling changes the appearance of ion-select to say it doesn't expect a click there from the user. So I want that appearance too where it doesn't respond to the click to open its default dialog. Some advice is much appreciated. Thanks

Upvotes: 2

Views: 536

Answers (1)

Mateo Tibaquira
Mateo Tibaquira

Reputation: 2136

Nowadays, a readonly ion-input seems to fit this requirement nicely,
handling the (click) event explicitly!

Upvotes: 2

Related Questions