gregnb / mui-datatables

Datatables for React using Material-UI
MIT License
2.71k stars 932 forks source link

curentFilterList on customFilterDialogFooter returns the previous filter list instead of the current filter list #1644

Open Aquilaafuadajo opened 3 years ago

Aquilaafuadajo commented 3 years ago

Expected Behavior

should return the current filter list

Current Behavior

returns the previous filter list instead

Steps to Reproduce (for bugs)

  1. add mui-datatables to your project
  2. include the options below options={{ confirmFilters: true, customFilterDialogFooter: (currentFilterList, applyFilters) => (<button onClick={() => { console.log('current filterList: ', currentFilterList) applyFilters() }}>apply) }}

    Your Environment

Tech Version
Material-UI ^4.11.2
MUI-datatables ^3.7.4
React ^17.0.1
browser chrome
etc
kneliba commented 3 years ago

Getting this issue as well