GerkinDev / vuejs-datatable

A Vue.js component for filterable and paginated tables.
https://gerkindev.github.io/vuejs-datatable/
MIT License
172 stars 44 forks source link

'Filterable' column option doesn't limit filterable fields #120

Open notthatnathan opened 4 years ago

notthatnathan commented 4 years ago

Tested in v.2.0.0-alpha.6 and 2.0.0-alpha.7

Expected one of these scenarios to work:

First scenario

Second scenario

Example

<input v-model="filter" />
<datatable :filter="filter" />

export default {
  data() {
    return {
      filter: ''
    }
  }
}

// columns
[
  {
    label: 'test',
    field: 'test',
    filterable: true,
  },
  {
    label: 'test2',
    field: 'test2',
    filterable: false,
  },
  {
    label: 'test2',
    field: 'test3',
  },
]

Expected: Entering test returns either the first or the first and last option Actual: Entering test returns all three

codemonkey76 commented 4 years ago

I'll confirm this is an issue, i can filter by any column even though most columns have filterable: false

GerkinDev commented 4 years ago

Thanks for the feedback! I'll try to look at this asap. PR welcome if you want and are faster than me ;)

codemonkey76 commented 4 years ago

I'm not smart enough, lol