Skip to content

passing an object variable into :ds-filter-fields #125

@keithjohnsdev

Description

@keithjohnsdev

Hi @kouts,

Let me start by saying I've been enjoying vue-dataset very much! You've done a great job here, so please read this as more of a question than a complaint.

I'm trying to add custom filtering to a dataset table, by building a "filterObject" object and then passing that as the value of the ds-filter-fields prop:

let filterObject = { id: 115 }
:ds-filter-fields="filterObject"

But it doesn't seem to be working. It works correctly when I explicitly define the object inline:

:ds-filter-fields="{ id: 115 }"

I've tried it as a ref:

let filterObject = ref({ id: 115 })
:ds-filter-fields="filterObject.value"

I've also tried as a reactive object to no success, but I haven't tried as a computed variable.

Is there a way to make it work by passing an object variable? Is there something I'm missing?

Thanks for any help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions