Skip to content

Instantly share code, notes, and snippets.

@israeleriston
Created July 16, 2017 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save israeleriston/d1db9a12622f659e74ad1ddfe49918ff to your computer and use it in GitHub Desktop.
Save israeleriston/d1db9a12622f659e74ad1ddfe49918ff to your computer and use it in GitHub Desktop.
Erro ao passar as props
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