GithubHelp home page GithubHelp logo

kevinvandy / material-react-table Goto Github PK

View Code? Open in Web Editor NEW
1.3K 14.0 368.0 19.57 MB

A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript

Home Page: https://material-react-table.com

License: MIT License

JavaScript 11.65% TypeScript 71.41% CSS 0.03% HTML 1.50% Shell 0.04% MDX 15.37%
react typescript react-table material-table material-ui data-table tanstack datagrid

material-react-table's Introduction

Material React Table V2

View Documentation

About

Quickly Create React Data Tables with Material Design

MRT

Want to use Mantine instead of Material UI? Check out Mantine React Table

Learn More

Quick Examples

View additional storybook examples

Features

All features can easily be enabled/disabled

Fully Fleshed out Docs are available for all features

  • 30-56kb gzipped - Bundlephobia
  • Advanced TypeScript Generics Support (TypeScript Optional)
  • Aggregation and Grouping (Sum, Average, Count, etc.)
  • Cell Actions (Right-click Context Menu)
  • Click To Copy Cell Values
  • Column Action Dropdown Menu
  • Column Hiding
  • Column Ordering via Drag'n'Drop
  • Column Pinning (Freeze Columns)
  • Column Resizing
  • Customize Icons
  • Customize Styling of internal Mui Components
  • Data Editing and Creating (5 different editing modes)
  • Density Toggle
  • Detail Panels (Expansion)
  • Faceted Value Generation for Filter Options
  • Filtering (supports client-side and server-side)
  • Filter Match Highlighting
  • Full Screen Mode
  • Global Filtering (Search across all columns, rank by best match)
  • Header Groups & Footers
  • Localization (i18n) support
  • Manage your own state or let the table manage it internally for you
  • Pagination (supports client-side and server-side)
  • Row Actions (Your Custom Action Buttons)
  • Row Numbers
  • Row Ordering via Drag'n'Drop
  • Row Pinning
  • Row Selection (Checkboxes)
  • SSR compatible
  • Sorting (supports client-side and server-side)
  • Theming (Respects your Material UI Theme)
  • Toolbars (Add your own action buttons)
  • Tree Data / Expanding Sub-rows
  • Virtualization (@tanstack/react-virtual)

Getting Started

Installation

View the full Installation Docs

  1. Ensure that you have React 18 or later installed

  2. Install Peer Dependencies (Material UI V5)

npm install @mui/material @mui/x-date-pickers @mui/icons-material @emotion/react @emotion/styled
  1. Install material-react-table
npm install material-react-table

@tanstack/react-table, @tanstack/react-virtual, and @tanstack/match-sorter-utils are internal dependencies, so you do NOT need to install them yourself.

Usage

Read the full usage docs here

import { useMemo, useState, useEffect } from 'react';
import {
  MaterialReactTable,
  useMaterialReactTable,
} from 'material-react-table';

//data must be stable reference (useState, useMemo, useQuery, defined outside of component, etc.)
const data = [
  {
    name: 'John',
    age: 30,
  },
  {
    name: 'Sara',
    age: 25,
  },
];

export default function App() {
  const columns = useMemo(
    () => [
      {
        accessorKey: 'name', //simple recommended way to define a column
        header: 'Name',
        muiTableHeadCellProps: { sx: { color: 'green' } }, //optional custom props
        Cell: ({ cell }) => <span>{cell.getValue()}</span>, //optional custom cell render
      },
      {
        accessorFn: (row) => row.age, //alternate way
        id: 'age', //id required if you use accessorFn instead of accessorKey
        header: 'Age',
        Header: () => <i>Age</i>, //optional custom header render
      },
    ],
    [],
  );

  //optionally, you can manage any/all of the table state yourself
  const [rowSelection, setRowSelection] = useState({});

  useEffect(() => {
    //do something when the row selection changes
  }, [rowSelection]);

  const table = useMaterialReactTable({
    columns,
    data,
    enableColumnOrdering: true, //enable some features
    enableRowSelection: true,
    enablePagination: false, //disable a default feature
    onRowSelectionChange: setRowSelection, //hoist internal state to your own state (optional)
    state: { rowSelection }, //manage your own state, pass it back to the table (optional)
  });

  const someEventHandler = () => {
    //read the table state during an event from the table instance
    console.log(table.getState().sorting);
  };

  return (
    <MaterialReactTable table={table} /> //other more lightweight MRT sub components also available
  );
}

Open in Code Sandbox

Contributors

PRs are Welcome, but please discuss in GitHub Discussions or the Discord Server first if it is a large change!

Read the Contributing Guide to learn how to run this project locally.

material-react-table's People

Contributors

alexzrp avatar andreimatei avatar anyone-yuren avatar calamarico avatar chaptersevenseeds avatar dangkhoa99 avatar dca123 avatar dmhumphrey avatar duckboy81 avatar gaspardip avatar gioqw avatar hanjaejoon avatar igor-dnascript avatar imnasnainaec avatar jlundan avatar joey-kwl avatar kevinvandy avatar kiledonley avatar kopach avatar lalong13 avatar loughlinclaus3 avatar muhammadalsattar avatar nakeva avatar oliviertassinari avatar paolapog avatar samchiu90 avatar tacigar avatar tometo-dev avatar volene avatar yongthepsibor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

material-react-table's Issues

Re render not happening on updated tableData when editingMode="table"

material-react-table version

1.3.2

Describe the bug and the steps to reproduce it

I am updating the tableData and calling setTableData([...tableData]) to re render the MaterialReactTable but table is not getting updated with new Data.

Minimal, Reproducible Example - (Optional, but Recommended)

const copyContent = async (row, index) => {
console.log(row.row.original);
await window.navigator.clipboard.writeText(
JSON.stringify(row.row.original)
);
};

const pasteContent = async (row, index) => {
    const rowIndex = row.row.index;
    const pasteData = await window.navigator.clipboard.readText();
    const rowData = JSON.parse(pasteData);
    tableData[rowIndex] = rowData;
    setTableData([...tableData]); --> **This is not updating the MaterialReactTable with new data**
};

return (
<MaterialReactTable
  columns={ columns }
  data={ tableData }
  editingMode="table"
  enableEditing
  enableRowNumbers
  rowNumberMode="static"
  enableRowActions
  positionActionsColumn="last"
  renderRowActions={ (row, index) => (
    <Box>
      <IconButton onClick={ () => copyContent(row, index) }>
        <ContentCopyIcon />
      </IconButton>
      <IconButton onClick={ () => pasteContent(row, index) }>
        <ContentPasteIcon />
      </IconButton>
    </Box>
  ) }

  muiTableBodyCellEditTextFieldProps={ ({ cell }) => ({
      // onBlur is more efficient, but could use onChange instead
      onBlur: (event) => {
          handleSaveCell(cell, event.target.value);
      },
      variant: 'outlined'
  }) }
/>
);

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
  • I have verified I am using the correct peer dependency versions for my version of material-react-table listed in the installation instructions.

Set cell cursor to pointer if onRowClick is set

Describe the bug

Thank you for this awesome library!

It would be nice if cursor: 'pointer' were set if onCellClick or onRowClick were set. Here is where it is set to 'text' in the code.
https://github.com/KevinVandy/material-react-table/blob/main/src/body/MRT_TableBodyCell.tsx#L149

Your minimal, reproducible example

No response

Steps to reproduce

Hovering over a table with onRowClick shows a text cursor. Selecting text fires the onRowClick behavior.

Expected behavior

As a user, I expected a cursor: pointer to make the row click behavior more discoverable

How often does this bug happen?

Every time

Screenshots or Videos (Optional)

No response

material-react-table version

0.13.3

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Rows' checkbox overlap header checkbox when enableRowSelection and enableStickyHeader is enabled

material-react-table version

v1.0.2

Describe the bug and the steps to reproduce it

  1. Create table with enableRowSelection and enableStickyHeader props.
  2. Set a height limit for the table (ex: muiTableContainerProps={{ sx: { maxHeight: "30vh" } }})
  3. Scroll the table, and the rows' checkbox starts to overlap the select all checkbox of the header.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/material-react-table-sticky-header-with-row-selection-pe4zx2?file=/src/App.js:1039-1093

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Columns not in columns prop at first render are pushed to end of table

material-react-table version

1.2.6

Describe the bug and the steps to reproduce it

If the array passed in "colums" props have more columns than previously, added columns are pushed at the end of the table

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/thirsty-bohr-2y5wom?file=/src/App.js

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

onPaginationChange does not include column filter mode

material-react-table version

1.2.10

Describe the bug and the steps to reproduce it

When calling the onColumnFiltersChange event, the data you get back includes only the id and value.

In case the enableColumnFilterModes is enabled, the onColumnFiltersChange should also include the selected mode.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

Sandbox example

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Scroll bar bouncing

material-react-table version

1.1.1

Describe the bug and the steps to reproduce it

I am not sure.

I have attached a sample. It seems there is some bug in scrolling the rows. See from my video, after scrolling a bit suddenly the scroll bar starts to bounce up and down.
It seems from the console log that this is caused by an infinite update loop.

I have tested on chrome and firefox on mac.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

Code sandbox
https://codesandbox.io/p/github/ziggy6792/material-react-table-issue/draft/recursing-moser?file=%2FREADME.md

Github
https://github.com/ziggy6792/material-react-table-issue

Screenshots or Videos (Optional)

Dropbox screen recording of issue
(goto end to see issue)
https://www.dropbox.com/s/lp7dl6io2qync6o/material-react-table-issue.mov?dl=0

Do you intend to try to help solve this bug with your own PR?

No, because I don't have time to dig into it

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Can't perform a React state update on a component that hasn't mounted yet

material-react-table version

1.3.8

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

I'm using material-react-table with redux RTK Query for fetching some that from backend and when I refresh the page I receive this error in the console.log

Warning: Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.
    at MRT_TableRoot

I think that the error is because I use Suspense for loading pages but I don t know how to fix the error

Minimal, Reproducible Example - (Optional, but Recommended)

I don t have yet

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Issues with manual filter when change mode

material-react-table version

v0.40.11

Describe the bug and the steps to reproduce it

  1. Create table with these props: manualFiltering, enableColumnFilters, enableColumnFilterModes, onColumnFiltersChange.
  2. Manage the customFilter state.
  3. Open column filter, type anything in the box.
  4. Then switch modes. The column that has its mode changed will not display when capture in useEffect, but the input still persists (It should also clear the input or keep the filter when change modes).

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/material-react-table-check-jpysue?file=/src/App.js

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

No loading animation when filter is set and data empty

material-react-table version

1.3.16

react & react-dom versions

18.0.20

Describe the bug and the steps to reproduce it

The skeleton rows get filtered out. So there is no visible loading animation.

Minimal, Reproducible Example - (Optional, but Recommended)

(https://stackblitz.com/edit/github-hncymy?file=src/TS.tsx)

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Using a fixed size for a pinned column makes the pinned column unstable.

material-react-table version

1.4.0

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

There's two issues.
It might be better to divide the issue, but I think it's relevant, so I'm writing it together.

1. The size value affects .Mui-TableHeadCell-Content, not .MuiTableCell-head.

Each column is slightly wider because of padding, but the left value to pin the column is still synchronized with the size value.
So, when there are multiple pinned columns, the columns are unstable as much as the size of the padding.

1. When the width of a column is widened by a feature such as show filter, the left value for pinning the column is not synchronized with the width.

The column has widened, but The left value keeps the same and the pinned columns are unstable more.

Minimal, Reproducible Example - (Optional, but Recommended)

Edit MRT_pinned_column_issue

Screenshots or Videos (Optional)

Case of 1

mrt_unstabel_pin_columns
image
image
image

Case of 2

mrt_unstabel_pin_columns_with_filter
image
image

Do you intend to try to help solve this bug with your own PR?

No, because I don't have time to dig into it

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Docs - Pin (Freeze) Columns By Default

material-react-table version

v1.2.6

Describe the bug and the steps to reproduce it

Not sure if this is a legacy feature/state. But I can't find any type/property for pinning and I wonder if the docs are outdated.
https://www.material-react-table.com/docs/guides/column-pinning#pin-(freeze)-columns-by-default

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://www.material-react-table.com/docs/guides/column-pinning#pin-(freeze)-columns-by-default

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Uncaught error when using filterVariant: multi-select

material-react-table version

0.41.0

Describe the bug and the steps to reproduce it

This change introduced a bug where using filterVariant: 'multi-select' will make MUI's SelectInput throw with the following message:

MUI: The value prop must be an array when using the Select component with multiple.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

No response

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

get tableId with document.getElementById return null

material-react-table version

v0.36.0

Describe the bug and the steps to reproduce it

I have a problem when trying to get TableId using document.getElementById, for export customed data to excel later, i already define the tableId props and used callback for the getElementById function and the console.log of it return null

here the error log
image

thank you!

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

<div>
	<Button
		onClick={() => console.log(document.getElementById('market-table'))}
	>
		 Export All
	</Button>
</div>
<MaterialReactTable
        tableId="market-table"
        columns={dataColumns}
        data={filteredMarketsByNameState}
        enableColumnActions={true}
        enableColumnFilters={true}
        enablePagination={true}
        enableSorting={true}
        enableBottomToolbar={true}
        enableTopToolbar={true}
        enableRowNumbers={true}
        muiTableBodyRowProps={{ hover: true }}
/>

Screenshots or Videos (Optional)

image
here screenshot my code too

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Horizontal and Vertical virtualization

material-react-table version

V1.3.9

react & react-dom versions

v18.0.2

Describe the bug and the steps to reproduce it

Setting the following virtualizer prop true make the vertical virtualization to work incorrectly:

horizontal: true

I understand what this means. I was just wondering if it's possible to have horizontal and vertical virtualization to be enabled simultaneously.

I am attempting to render a 183 Column by 80k Row table in a project.
The performance is however unusable.

How can both axis' virtualization be enabled simultaneously?

Minimal, Reproducible Example - (Optional, but Recommended)

The code is described above.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Global Filter and column filter search both are not working Debounce Error

material-react-table version

1.3.2

Describe the bug and the steps to reproduce it

When I am trying to search any input from the table in the search i am getting this warning and error.
And input are not filtered.

Console:
Warning:
react-dom.development.js:88 Warning: This synthetic event is reused for performance reasons. If you're seeing this, you're accessing the property target on a released/nullified synthetic event. This is set to null. If you must keep the original synthetic event around, use event.persist(). See https://fb.me/react-event-pooling for more information.

Error:
MRT_GlobalFilterTextField.tsx:51 Uncaught TypeError: Cannot read properties of null (reading 'value')
at MRT_GlobalFilterTextField.tsx:51:1
at later (debounce.js:8:1)

Minimal, Reproducible Example - (Optional, but Recommended)

I simply copied one of the example from Material react table in my react application but all the features are working except
filter search.

https://codesandbox.io/s/github/KevinVandy/material-react-table/tree/main/material-react-table-docs/examples/enable-editing-cell/sandbox?file=/src/TS.tsx

Screenshots or Videos (Optional)

Uploading Screenshot 1944-08-13 at 3.57.20 PM.png…

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
  • I have verified I am using the correct peer dependency versions for my version of material-react-table listed in the installation instructions.

Show/Hide columns malfunction when using useState with enableGrouping

material-react-table version

1.3.10

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

import React, { useEffect, useState } from "react";

import MaterialReactTable from "material-react-table";

const Basic = () => {
  const [columns, setColumns] = useState([]);
  const [data, setData] = useState([]);

  useEffect(() => {

     // Do something and set columns and data

    setColumns([
      {
        accessorKey: "name.firstName", //access nested data with dot notation
        header: "First Name",
      },
      {
        accessorKey: "name.lastName",
        header: "Last Name",
      },
      {
        accessorKey: "address", //normal accessorKey
        header: "Address",
      },
      {
        accessorKey: "city",
        header: "City",
      },
      {
        accessorKey: "state",
        header: "State",
      },
    ]);

    setData([
      {
        name: {
          firstName: "John",
          lastName: "Doe",
        },
        address: "261 Erdman Ford",
        city: "East Daphne",
        state: "Kentucky",
      },
      {
        name: {
          firstName: "Jane",
          lastName: "Doe",
        },
        address: "769 Dominic Grove",
        city: "Columbus",
        state: "Ohio",
      },
      {
        name: {
          firstName: "Joe",
          lastName: "Doe",
        },
        address: "566 Brakus Inlet",
        city: "South Linda",
        state: "West Virginia",
      },
      {
        name: {
          firstName: "Kevin",
          lastName: "Vandy",
        },
        address: "722 Emie Stream",
        city: "Lincoln",
        state: "Nebraska",
      },
      {
        name: {
          firstName: "Joshua",
          lastName: "Rolluffs",
        },
        address: "32188 Larkin Turnpike",
        city: "Charleston",
        state: "South Carolina",
      },
    ]);
  }, []);

  return <MaterialReactTable columns={columns} data={data} enableGrouping />;
};

export default Basic;

By using this simple code to reproduce the Show/Hide Columns function cannot be used.

Minimal, Reproducible Example - (Optional, but Recommended)

use the above sample code I provided, the Show/Hide columns function shows empty.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

FullScreen breaks if isFullScreen is controlled

material-react-table version

1.0.0-beta.1

Describe the bug and the steps to reproduce it

if I want to control isFullScreen, MRT stops render Dialog when isFullScreen === true

  const [isFullScreen, setIsFullScreen] = useState(false);

  return (
    <MaterialReactTable
      columns={columns}
      data={data}
      onIsFullScreenChange={setIsFullScreen}
      state={{ isFullScreen }}
    />
  );

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/kevinvandy-material-react-table-issue-fullscreen-4yhvx2

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Yes, I am also opening a PR that solves the problem along side this issue

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Performance issues when editing

material-react-table version

0.34.1

Describe the bug and the steps to reproduce it

see the sandbox, the library has severe performance problem for large scale editable dataset with most table features enabled

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/material-react-table-performance-testing-spd542?file=/src/TS.tsx

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Overriding body style can mess with app style.

material-react-table version

1.0.0-beta.7

Describe the bug and the steps to reproduce it

The following align assign a style to body. I think this component should not change the dom outside of the component scope and if it does, it should make sure it restore it correctly.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

document.body.style.height = 'auto';

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

Yes, I think I know how to fix it and will discuss it in the comments of this issue

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

EditTextField enable in group row

material-react-table version

1.2.7

Describe the bug and the steps to reproduce it

enableGrouping = true
enableEditing = true
editingMode="table"

When I group a column that has editing disabled, the EditTextField appears in the column that has editing enabled, in the row that corresponds to grouping
https://web.uds.edu.py/intranet/archivos/Material-React-table-issue.png
In the url is a print screen of the problem, in the 2 grouping row show the EditTextField
Thanks..

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/nostalgic-payne-ucizp8?file=/src/App.js

Screenshots or Videos (Optional)

Material-React-table-issue

Do you intend to try to help solve this bug with your own PR?

Yes, I think I know how to fix it and will discuss it in the comments of this issue

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Unable to manage customFilterFns manually

material-react-table version

v0.40.10

Describe the bug and the steps to reproduce it

  1. Create table with these props: manualFiltering, enableColumnFilters, enableColumnFilterModes, onFilterFnsChange.
  2. Manage the customFilterFns state.
  3. After that, the filter modes were unable to be switched despite changes being visible when capture by useEffect

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/material-react-table-check-jpysue?file=/src/App.js

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

fix RTL issue with MUI Pagination Back and Left Icons

material-react-table version

"material-react-table": "1.2.8"

Describe the bug and the steps to reproduce it

hi ,

When using the table in persian lang(RTL theme) , the arrow icons are displayed in reverse

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

fix icons in RTL mode

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

multiple fetching after page size

material-react-table version

v0.28

Describe the bug and the steps to reproduce it

Hi,
After change of rows per page, The request is send twice.

const ReactMaterialTable = ({columns, url, params = {}, ...other}) => {
    const tableRef = useRef()
    const [loading, setLoading] = useState(false);
    const [data, setData] = useState([]);
    const [isLoading, setIsLoading] = useState(false);
    const [isRefetching, setIsRefetching] = useState(false);
    const [columnFilters, setColumnFilters] = useState([]);
    const [globalFilter, setGlobalFilter] = useState('');
    const [sorting, setSorting] = useState([]);
    const [pagination, setPagination] = useState({
        pageIndex: 0,
        pageSize: 10,
    });
    const [rowCount, setRowCount] = useState(0);
    const {get} = useApi();


    useEffect(() => {
        const fetchData = async () => {
            if (!data.length) {
                setIsLoading(true);
            } else {
                setIsRefetching(true);
            }

            const params = {
                ...params,
                'page': `${pagination.pageIndex + 1}`,
                'per-page': `${pagination.pageSize}`,
                'filters': JSON.stringify(columnFilters ?? []),
                'globalFilter': globalFilter ?? '',
                'sorting': JSON.stringify(sorting ?? [])
            };

            const response = await get(url, params);
            if (response.status === 200) {
                if (response.data.data) {
                    setData(response.data.data);
                    setRowCount(response.headers['x-pagination-total-count']);
                    setPagination({...pagination, pageSize: response.headers['x-pagination-per-page']});
                    //pageIndex: response.headers['x-pagination-current-page']
                }
            }
            setIsLoading(false);
            setIsRefetching(false);
        };
        fetchData();
        // eslint-disable-next-line react-hooks/exhaustive-deps
    }, [
        columnFilters,
        globalFilter,
        pagination.pageIndex,
        pagination.pageSize,
        sorting,
    ]);

    return (
        <MaterialReactTable
            {...other}
            columns={columns}
            data={data}
            rowCount={rowCount}
            manualFiltering
            manualPagination
            manualSorting
            onColumnFiltersChange={setColumnFilters}
            onGlobalFilterChange={setGlobalFilter}
            onPaginationChange={setPagination}
            onSortingChange={setSorting}
            state={{
                columnFilters,
                globalFilter,
                isLoading,
                pagination,
                showProgressBars: isRefetching,
                sorting,
            }}
            muiTablePaginationProps={{
                labelRowsPerPage: "تعداد در صفحه",
                labelDisplayedRows: function defaultLabelDisplayedRows({from, to, count}) {
                    return `${from}–${to} از ${count !== -1 ? count : `بیشتر از ${to}`}`;
                }
            }}
            localization={tableLocalization}
        />
    )
}

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Columns order not respected for columns containing other columns

material-react-table version

1.0.4

Describe the bug and the steps to reproduce it

When there is columns containing other columns they seem to be pushed at the end of the table, not respecting order of the column definitions.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

Columns order not respected for columns containing other columns

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Setting positionActionsColumn="last" not working as expected

material-react-table version

v1.0.5

Describe the bug and the steps to reproduce it

On MaterialReactTable props:

  1. Set editingMode="cell"
  2. Set positionActionsColumn="last"
  3. Change editingMode to modal

As we change from editingMode="cell" to editingMode="modal" the actions column appears on an unexpected position (first column).

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/strange-andras-440o9j?file=/src/App.js

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

The `manualGrouping` doesn't work

material-react-table version

v1.2.0

Describe the bug and the steps to reproduce it

When enable manual grouping seems to be doesn't work.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

Here's the codesandbox:
https://codesandbox.io/s/mrt-manual-grouping-issue-r8r5cn?file=/src/TS.tsx

Just toggle the commented field manualGrouping.

Screenshots or Videos (Optional)

With manualGrouping true

Rohmanshot 2022-09-29 at 14 14 11@2x

With manualGrouping false

Rohmanshot 2022-09-29 at 14 14 55@2x

Do you intend to try to help solve this bug with your own PR?

No, because I don't have time to dig into it

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Field validation in row edit

material-react-table version

0.32.2

Describe the bug and the steps to reproduce it

If validation fail for a single field in a row, the field will be in an error state in every other rows

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://www.material-react-table.dev/?path=/story/features-editing-examples--editing-with-validation

Screenshots or Videos (Optional)

-- Removing first name in first row --
Screenshot 2022-08-09 at 10 27 32

-- First name appears as invalid in second row --

Screenshot 2022-08-09 at 10 28 47

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

ValidationError state lingers on row edit cancel

material-react-table version

1.3.16

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

Steps to reproduce

  1. Open example using validationErrors state: https://www.material-react-table.com/docs/examples/editing-crud
  2. Open a row
  3. Clear out the First Name
  4. Hit save. The validationError "First Name is required" should be displayed
  5. Hit cancel.
  6. Reopen the same row. The validationError still exists, even though the error does not (as the first name exists in the field).

Suggested remedy:
Simplest remedy I can see is to create an onEditingRowCancel prop triggered off the row edit cancel button to allow the state to be cleared at that time.

Minimal, Reproducible Example - (Optional, but Recommended)

Can be reproduced via editing-crud example as explained above

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Yes, I think I know how to fix it and will discuss it in the comments of this issue

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Error occurs when data is empty, isLoading is true and a filter for a nested field is set

material-react-table version

1.3.16

react & react-dom versions

18.0.20

Describe the bug and the steps to reproduce it

This error only seems to occur when three conditions are met:

  1. isLoading = true
  2. filter ist set for nested field (e.g. "name.firstName")
  3. data is empty (data={[]})

In a real app this would happen if I need to wait for a server request to return before filling in the data.

Workaround: Only set filters when data arrives (Won't work if the server doesn't return any rows).

Minimal, Reproducible Example - (Optional, but Recommended)

https://stackblitz.com/edit/github-2hvpac?file=src/TS.tsx

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

onColumnOrder not working properly

material-react-table version

v1.2.9

Describe the bug and the steps to reproduce it

Hello! First off all, congrats on the amazing project, it's impressive!

My issue is abou a bug, or a bad use of my part. I'm trying to use the prop onColumnOrder, Im doing it the exact same way it appears in the docs, but when I reorder the columns, its state doesn't change.

I aways get [undefined] or [null] values.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

onColumnOrderChange={setColumnOrder}
state={{ columnOrder: columnOrder, }}

const [columnOrder, setColumnOrder] = React.useState<ColumnOrderState>([ ]);

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Column resizing rendering performance

material-react-table version

1.2.10

Describe the bug and the steps to reproduce it

Rendering of the column's resize handle movement is visibly lagging. Reproducible even on a regular scenario, when MaterialReactTable's enableColumnResizing prop is set to true.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

Lags are observable even on the official CodeSandbox-hosted sample (with only 5 rows in it). It is not so visible right in the documentation site I suppose because of higher available computing power. However it seems to me this scenario is quite simple and ordinary usage to be so computationally-demanding.

Screenshots or Videos (Optional)

Here is a demo GIF that was captured on the production build of the app: Lagging behavior demo-GIF

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Virtual Rows Blink When Rows Have Varying Heights On Scroll

material-react-table version

0.33.6

Describe the bug and the steps to reproduce it

  1. Open https://www.material-react-table.dev/?path=/story/features-virtualization--enable-row-virtualization
  2. perform some scrolls on table.
  3. glitches occur.

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://www.material-react-table.dev/?path=/story/features-virtualization--enable-row-virtualization

Screenshots or Videos (Optional)

capture

capture2

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Fix sticky footer with pinned columns in full-screen mode

material-react-table version

1.0.11

Describe the bug and the steps to reproduce it

I enable sticky footer and pinning column,
But when i scroll it follow left to right, has a small issue with css

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

No

Screenshots or Videos (Optional)

Screen Shot 2022-09-21 at 16 57 27

Do you intend to try to help solve this bug with your own PR?

Yes, I think I know how to fix it and will discuss it in the comments of this issue

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Initial column pinning on header group does not work

material-react-table version

1.2.9

Describe the bug and the steps to reproduce it

Pinning header group work once the table has rendered from pinning button but not if set from initialState.columnPinning

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/thirsty-orla-zygm3n?file=/src/App.js

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

renderDetailPanel - Maximum call stack size exceeded

material-react-table version

v0.22.2

Describe the bug and the steps to reproduce it

Whenever I add renderDetailPanel={({ row }) => <div></div>} to my table I'm getting a TS Maximum call stack size exceeded Error. If I remove the property my table works perfect.

Your Minimal, Reproducible Example (Sandbox or code snippets)

Table:

        <MaterialReactTable
          columns={columns}
          data={data?.results ?? []}
          // renderDetailPanel={({ row }) => <div></div>}
          rowCount={data?.count ?? 0}
          state={{
            isLoading,
            showAlertBanner: isError,
            showProgressBars: isFetching && isStale,
          }}
        />

Columns

  const columns = useMemo(
    () => [
      {
        accessorKey: 'id',
        header: 'ID',
      },
    ],
    []
  );

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Module not found: Can't resolve '@mui/icons-material'

material-react-table version

1.0.7

Describe the bug and the steps to reproduce it

Just installed it and copied the example provided in the home page and got that error, not sure if it can be removed completely or be added to the dependency list

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

No code required, I was able to fix this by installed @mui/icons-material separately, I'm using react-icons as a main icons lib instead but was forced to download the icons material in order to make the table work

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Yes, I think I know how to fix it and will discuss it in the comments of this issue

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Row ordering feature breaks if react-dnd is around

material-react-table version

1.0.11

Describe the bug and the steps to reproduce it

I was stuck not understanding why the example of row ordering did not work in my app. It looks like it is react-dnd fault because when I commented all react-dnd related stuff, row ordering worked again. I created a codeSandbox to open this issue where I wanted to put a table inside react-dnd DndProvider and one outside of it to show a working one, but it appears that also the table outside DndProvider is broken

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

https://codesandbox.io/s/crazy-davinci-8kuzw2?file=/src/App.js

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Cancel button in row edit

material-react-table version

v0.26.2

Describe the bug and the steps to reproduce it

In row edit mode, when cancelling the same row a second time, the "cancel" button acts as confirm

Your Minimal, Reproducible Example (Sandbox or code snippets)

https://www.material-react-table.dev/?path=/story/features-editing-examples--editing-enabled-edit-mode-cell

Screenshots or Videos (Optional)

bug.in.edit.row.mp4

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

[Sticky Header] The sticky header is not work

material-react-table version

0.18.1

Describe the bug and the steps to reproduce it

The sticky header row was default. When i set props

======
columns={cloneColumns}
data={data}
enableColumnOrdering
enablePagination={false}
enablePinning
enableDensityToggle={false}
initialState={{ density: 'compact', ...initialState }}
enableColumnResizing
enableColumnFilters
enableToolbarBottom={false}
enableGlobalFilter={false}
state={{ isLoading: loading }}
muiTableContainerProps={{ sx: { maxHeight: '600px' } }}

But it is not work

Your Minimal, Reproducible Example (Sandbox or code snippets)

Not exam

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Adding initialState prop makes positionActionsColumn="last" not work

Describe the bug

positionActionsColumn="last" works correctly without the initialState prop
After adding

const initialState = {
  density: "compact"
} as const;

and reloading, the actions column is the first column again.

Your minimal, reproducible example

https://codesandbox.io/s/infallible-dubinsky-555h5q?file=/src/TS.tsx:469-524

Steps to reproduce

  1. The actions column is in the first column when first loading the page

Expected behavior

As a user, I am expecting the positionActionsColumn="last" to put the actions column in the last column, but it is still in the first column.

How often does this bug happen?

Every time

Screenshots or Videos

image

material-react-table version

0.13.1

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

enableHiding={false} has no effect

material-react-table version

v1.0.1

Describe the bug and the steps to reproduce it

The corresponding button in the top toolbar is displayed although the option enableHiding is set to false

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

<MaterialReactTable
columns={columns}
data={props.data}
enableHiding={false}
...
/>

Screenshots or Videos (Optional)

image

Do you intend to try to help solve this bug with your own PR?

No, because I don't have time to dig into it

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Type instantiation is excessively deep and possibly infinite

material-react-table version

1.2.10

Describe the bug and the steps to reproduce it

I'm trying to include this awesome table in my project but when building it (NextJS + Typescript) I hit this error regarding the column definition. The types are generated from our GraphQL schema, is it too much to handle for the table? Locally everything works fine, but when hitting yarn build it fails with

Type error: Type instantiation is excessively deep and possibly infinite.

  115 | 
  116 |     const columns: MRT_ColumnDef<DailyStamp>[] = [
> 117 |         {
      |         ^
  118 |             accessorKey: 'date',
  119 |             header: 'Data',
  120 |             enableColumnOrdering: true,

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

type DailyStamp = {
  __typename?: 'DailyStamp';
  date: Scalars['String'];
  justifying?: Maybe<Justifying>;
  in1?: Maybe<StampDataEmployee>;
  out1?: Maybe<StampDataEmployee>;
  in2?: Maybe<StampDataEmployee>;
  out2?: Maybe<StampDataEmployee>;
  in3?: Maybe<StampDataEmployee>;
  out3?: Maybe<StampDataEmployee>;
  in4?: Maybe<StampDataEmployee>;
  out4?: Maybe<StampDataEmployee>;
  timeModel: Scalars['String'];
  totalInDecimal: Scalars['Float'];
  totalInHours: Scalars['String'];
};

type StampDataEmployee = {
  __typename?: 'StampDataEmployee';
  id: Scalars['String'];
  timestamp: Scalars['String'];
  direction: Scalars['String'];
  type: Scalars['String'];
  timeModel: Scalars['String'];
  history?: Maybe<Array<Maybe<StampHistory>>>;
};

type StampHistory = {
  __typename?: 'StampHistory';
  type: Scalars['Int'];
  timestamp: Scalars['Int'];
  createdAt: Scalars['Int'];
};


const columns: MRT_ColumnDef<DailyStamp>[] = [
        {
            accessorKey: 'date',
            header: 'Data',
            enableColumnOrdering: true,
            enableEditing: false, //disable editing on this column
            enableSorting: true,
        },
        {
            accessorKey: 'justifying',
            header: 'Giustificativo',
            enableEditing: false,
        },
        {
            accessorKey: 'in1',
            header: 'IN 1',
            minSize: 80,
            Cell: ({ cell }) => cell.getValue<StampDataEmployee>() ? moment(cell.getValue<StampDataEmployee>().timestamp).format('HH:mm') : '--:--',
            Edit: ({ cell }) => (
                <TimePicker
                    value={cell.getValue<StampDataEmployee>() ? cell.getValue<StampDataEmployee>().timestamp : null}
                    onChange={(newValue: Date) => undefined}
                    renderInput={(params) =>
                        <TextField
                            {...params}
                            size="small"
                            variant="outlined"
                            fullWidth
                        />
                    }
                />
            )
        },
        {
            accessorKey: 'out1',
            header: 'OUT 1',
            minSize: 80,
            Cell: ({ cell }) => cell.getValue<StampDataEmployee>() ? moment(cell.getValue<StampDataEmployee>().timestamp).format('HH:mm') : '--:--',
            Edit: ({ cell }) => (
                <TimePicker
                    value={cell.getValue<StampDataEmployee>() ? cell.getValue<StampDataEmployee>().timestamp : null}
                    onChange={(newValue: Date) => undefined}
                    renderInput={(params) =>
                        <TextField
                            {...params}
                            size="small"
                            variant="outlined"
                            fullWidth
                        />
                    }
                />
            )
        },
        {
            accessorKey: 'totalInDecimal',
            header: 'Totale DEC',
            enableEditing: false,
            Cell: ({ cell }) => cell.getValue<StampDataEmployee>() ? cell.getValue<number>().toFixed(2) : '--:--',
        },
        {
            accessorKey: 'totalInHours',
            header: 'Totale Ore',
            enableEditing: false,
        }
    ];

    return (
        <>
            <MaterialReactTable
                displayColumnDefOptions={{
                    'mrt-row-actions': {
                        muiTableHeadCellProps: {
                            align: 'center',
                        },
                        size: 120,
                    },
                }}
                columns={columns}
                data={tableData}
                editingMode="cell" //default
                enableColumnOrdering
                enableColumnResizing
                enableEditing
            />
    );

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Custom filterFn breaks the tooltip

material-react-table version

v1.3.9

react & react-dom versions

v17.0.2

Describe the bug and the steps to reproduce it

If prop filterFn is function then filterType value in tooltip is undefined.

Minimal, Reproducible Example - (Optional, but Recommended)

This can be checked with an example from storybook:
https://www.material-react-table.dev/?path=/docs/features-filtering-examples--custom-filter-fns#custom-filter-fns

Screenshots or Videos (Optional)

filter

Do you intend to try to help solve this bug with your own PR?

No, because I don't know how

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Filter string not showing if set programmatically when showColumnFilters=true

material-react-table version

1.3.16

react & react-dom versions

18.0.20

Describe the bug and the steps to reproduce it

If showColumnFilter is true and I set a filter programmatically the string is not shown at first. Only if I close and open the filter row it appears.

Minimal, Reproducible Example - (Optional, but Recommended)

https://stackblitz.com/edit/github-ikb5ar?file=src/TS.tsx

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Maybe, I'll investigate and start debugging

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Allow "auto" for size (NaN error)

material-react-table version

1.2.7

Describe the bug and the steps to reproduce it

I use defaultColumn={{ size: "auto" }} for my Table, which is a working option to fixate some columns, but probably since you defined size as type Number, produces a Console Error:

Warning: NaN is an invalid value for the width css style property.

(Size gets used for Tanstack Table width.)

Your Minimal, Reproducible Example - Sandbox (Recommended) or code snippets

Set defaultColumn={{ size: "auto" }} and size a column with a simple size.

Check TanStack/table#3192 for reference.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

enableColumnResizing Props is not work with enableRowVirtualization Props

material-react-table version

^0.16.2

Describe the bug and steps to reproduce

If i use both enableColumnResizing and enableRowVirtualization, it only work with enableRowVirtualization and not work with enableColumnResizing.

Expected behavior

work with both

Your Minimal, Reproducible Example (Optional, but Recommended)

No response

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Default sort function is case-sensitive

material-react-table version

v1.3.4

react & react-dom versions

v18.2.0

Describe the bug and the steps to reproduce it

The documentation says:
"By default, Material React Table will use an alphanumeric sorting function for all columns."

But it appears to be using one of the case-sensitive algorithms. I've forked the Basic Example to illustrate this. All I have changed is 'Joe' to 'joe' and set the initial state to sort by name.firstName:
https://codesandbox.io/s/jovial-bush-th8o4h?file=/src/TS.tsx

Ref:
https://www.material-react-table.com/docs/guides/sorting#sorting-functions

Minimal, Reproducible Example - (Optional, but Recommended)

https://codesandbox.io/s/jovial-bush-th8o4h?file=/src/TS.tsx

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No response

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.