javascript - How to get filtered values from MUI datagrid - Stack Overflow

Is it possible to get values from mui DataGrid?I have a table and i want to have a custom export based

Is it possible to get values from mui DataGrid?

I have a table and i want to have a custom export based on user filter and columns that are hidden or displayed but i need these filtered values. There is any way to get this from DataGrid?

Is it possible to get values from mui DataGrid?

I have a table and i want to have a custom export based on user filter and columns that are hidden or displayed but i need these filtered values. There is any way to get this from DataGrid?

Share Improve this question edited Jan 21, 2022 at 17:10 Alexsandro Xavier Da Silveira asked Jan 20, 2022 at 16:05 Alexsandro Xavier Da SilveiraAlexsandro Xavier Da Silveira 512 silver badges5 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

You may want to use the gridFilteredSortedRowIdsSelector Most of the useful seletors for exporting are defined in the "Exported rows" section

The prop onSelectionModelChange gives you the IDs of the selected cells, and then you can filter them based on your requirements to export the selected ones.

 <DataGridPro
  onSelectionModelChange={(props)=>{
            console.log(props);
          }}
  />

DataGrid MUI has onStateChange, which have all the values, filtered values, count, and current state of the grid:

onStateChange={(e) => {
  console.log(e.pagination.rowCount)
  console.log(e)
}}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744686851a4587971.html

相关推荐

  • javascript - How to get filtered values from MUI datagrid - Stack Overflow

    Is it possible to get values from mui DataGrid?I have a table and i want to have a custom export based

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信