I wish to make a <q-list> of contacts with their telephone numbers, emails and addresses and I'm trying to make the <q-item>s clickable so that when the user clicks on any of the q-items, the phone dialer/mail-client/naviation app will fire up.
From what I gather <q-item> only supports @click but I can't think of a way other than openURL to pass the URL scheme (eg "tel:55512345"). The documentation however advises against it.
What is good way of doing it?
<q-item clickable>
<q-item-section avatar>
<q-icon name="mail" />
</q-item-section>
<q-item-section>
<q-item-label>[email protected]</q-item-label>
<q-item-label caption>email</q-item-label>
</q-item-section>
</q-item>
Since the docs advises to use an a(nchor) element for it, why not do so by using the tag prop and the native href for the URL scheme:
<q-item
tag="a"
href="tel:55512345"
clickable>
<q-item-section avatar>
<q-icon name="mail" />
</q-item-section>
<q-item-section>
<q-item-label>[email protected]</q-item-label>
<q-item-label caption>email</q-item-label>
</q-item-section>
</q-item>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With