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

[b-table] Anonymous filter-function is ignored since version 2.22.0 #6967

Open
manandre opened this issue Apr 28, 2022 · 2 comments
Open

[b-table] Anonymous filter-function is ignored since version 2.22.0 #6967

manandre opened this issue Apr 28, 2022 · 2 comments

Comments

@manandre
Copy link

Describe the bug

Any anonymous filter-function passed to a b-table component is ignored since version 2.22.0.
This is working correctly in version 2.21.2.

Steps to reproduce the bug

<template>
  <b>With Named Filter</b>
  <b-table :items="items" :filter="criteria" :filter-function="namedFilter">
  </b-table>
  <b>With Anonymous Filter</b>
  <b-table :items="items" :filter="criteria" :filter-function="anonymousFilterFactory()">
  </b-table>
</template>
<script>
export default {
  data() {
    return {
      anonymousFilterFactory: () => (row, filter) => false,
      namedFilter: (row, filter) => false,
      criteria: "40",
      items: [{
          age: 40,
          first_name: 'Dickerson',
          last_name: 'Macdonald'
        },
        {
          age: 21,
          first_name: 'Larsen',
          last_name: 'Shaw'
        },
        {
          age: 89,
          first_name: 'Geneva',
          last_name: 'Wilson'
        },
        {
          age: 38,
          first_name: 'Jami',
          last_name: 'Carney'
        }
      ]
    }
  }
})
}
</script>

image

Expected behavior

Same result with named or anonymous filter functions

image

Versions

Libraries:

  • BootstrapVue: 2.22.0
  • Bootstrap: 4.6.1
  • Vue: 2.6.12

Environment:

  • Device: PC
  • OS: Win 10 20H2
  • Browser: Chrome
  • Version: 100.0.4896.127

Demo link

CodePen

Additional context

It seems to be a regression introduced by #6345

@tbl0605
Copy link

tbl0605 commented May 4, 2022

Hi,
I have exactly the same problem. I use this feature a lot so I have to stick with version v2.21.2 until this regression is fixed.

Would it be possible to release a new version that only fixes this regression?
Thank you!

Thierry.

sephiroth-j added a commit to jenkinsci/dependency-track-plugin that referenced this issue Feb 1, 2023
@TDola
Copy link

TDola commented Feb 23, 2023

Just ran into this issue too and had to roll back. Eager for updates as we use tables an filtering a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants