T
T
TuMko2020-08-06 16:55:44
Bootstrap
TuMko, 2020-08-06 16:55:44

How to conditionally display Bootstrap Vue tooltip?

Hello. There is a user list output component. The user has an email field, if it is too long, it is cut off and the tooltip is displayed. How to make tooltip only show if email is truncated? Maybe you can somehow set the condition for adding the vb-tooltip directive?

<template>
<div class="row">
        <div v-for="user in getUserList" :key="user.id" class="col-md-4 col-sm-6">
            <div class="user-card__email" v-b-tooltip :title="user.email">{{ user.email }}</div>
        </div>
</template>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-08-10
@TuMko

v-b-tooltip="{ disabled: здесь ваше условие }"
https://jsfiddle.net/x591sy43/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question