Created
July 16, 2017 21:44
-
-
Save israeleriston/d1db9a12622f659e74ad1ddfe49918ff to your computer and use it in GitHub Desktop.
Erro ao passar as props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mounted () { | |
getUsersManagers().then(data => { | |
this.userOwnerOptions = data.info.map(value => ({ label: value.firstName, value: value._id })) | |
}) | |
this.searchTasks() | |
}, | |
// esse userOwnerOptions é passado para um array de filtros q eu renderizo dinamicamente quando o usuario seleciona | |
filters: [ | |
{ | |
label: 'Usuário Responsável Tarefa', | |
value: 'idUserOwner', | |
component: 'fn-select', | |
bind: { | |
type: 'list', | |
options: [ this.userOwnerOptions ], | |
validation: {} | |
} | |
}, | |
] | |
// como é passado como prop, dai o usuario monta seus filtros e clica em search, eu emito um evento para o pai dele, | |
// q executa a pesquisa com os parametros montado | |
<div class="card-content bg-white"> | |
<fn-filter @search="search" :filters="filters" v-model="filter"></fn-filter> | |
</div> | |
problema, esse this.this.userOwnerOptions é montado lá no mounted(), porém esta indo nulo para a prop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment