Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
notthatnathan opened this issue Feb 29, 2020 · 3 comments
Open

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

notthatnathan opened this issue Feb 29, 2020 · 3 comments
Labels
Bug An unexpected behavior/error PR Welcome If you like to, we would be glad to see some PR for this subject

Comments

@notthatnathan
Copy link

notthatnathan commented Feb 29, 2020

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

Expected one of these scenarios to work:

First scenario

  • Desired filterable fields with filterable: true
  • Expected: Only fields with this prop would be filterable
  • Actual: All fields are filterable

Second scenario

  • Fields not to be filtered with filterable: false
  • Expected: All other fields are filterable, but not these
  • Actual: They're still filterable

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

@GerkinDev GerkinDev added the Unconfirmed This thread suggests that there is a bug, but there's no repro yet label Apr 30, 2020
@codemonkey76
Copy link

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

@GerkinDev
Copy link
Owner

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

@GerkinDev GerkinDev added Bug An unexpected behavior/error PR Welcome If you like to, we would be glad to see some PR for this subject and removed Unconfirmed This thread suggests that there is a bug, but there's no repro yet labels Jul 19, 2020
@codemonkey76
Copy link

I'm not smart enough, lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An unexpected behavior/error PR Welcome If you like to, we would be glad to see some PR for this subject
Projects
None yet
Development

No branches or pull requests

3 participants