I have a PivotTable that updates according to an array of objects. In one of the columns of it I want to put a dropdown with the possible actions (edit, delete, etc). But the dropdown does not work and shows no error in the console. This is the dropdown button:
<ul :id="'dropdown'+index" class="dropdown-content">
<li><router-link :to="{name: 'update', params: {id: conta.id}}">Editar</router-link></li>
<li><a href="#" @click.prevent="pagarConta(conta)">Pagar</a></li>
<li><a href="#" @click.prevent="removerConta(index, conta)">Remover</a></li>
</ul>
<a href="#" class="dropdown-button btn" :data-activates="'dropdown'+index">Ações</a>
And this is the code I put at the end of my body:
<script type="text/javascript>
$('.dropdown-button').dropdown({
inDuration: 300,
outDuration: 225,
constrain_width: false, // Does not change width of dropdown to that of the activator
hover: true, // Activate on hover
gutter: 0, // Spacing from edge
belowOrigin: false, // Displays dropdown below the button
alignment: 'left' // Displays dropdown with edge aligned to the left of button
}
);
</script>