diff --git a/docs/data/data-grid/column-definition/column-definition.md b/docs/data/data-grid/column-definition/column-definition.md index ddde3c774e5fc..e0635c36d3d21 100644 --- a/docs/data/data-grid/column-definition/column-definition.md +++ b/docs/data/data-grid/column-definition/column-definition.md @@ -33,6 +33,12 @@ But for some columns, it can be useful to manually get and format the value to r ### Value getter +:::warning +Note that the signature of `valueGetter` has changed in v7 – see the [migration guide](https://mui.com/x/migration/migration-data-grid-v6/) for details. + +If you're using v6, please use the [v6 documentation](https://v6.mui.com/x/react-data-grid/column-definition/#value-getter). +::: + Sometimes a column might not have a desired value. You can use the `valueGetter` attribute of `GridColDef` to: @@ -102,6 +108,12 @@ The value passed to the `groupingValueGetter` is the raw row value (`row[field]` ### Value formatter +:::warning +Note that the signature of `valueFormatter` has changed in v7 – see the [migration guide](https://mui.com/x/migration/migration-data-grid-v6/) for details. + +If you're using v6, please use the [v6 documentation](https://v6.mui.com/x/react-data-grid/column-definition/#value-formatter). +::: + The value formatter allows you to convert the value before displaying it. Common use cases include converting a JavaScript `Date` object to a date string or a `Number` into a formatted number (for example "1,000.50"). diff --git a/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx b/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx index b21bc104604b0..81e7234e75481 100644 --- a/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx +++ b/packages/x-data-grid-pro/src/tests/infiniteLoader.DataGridPro.test.tsx @@ -198,14 +198,14 @@ describe(' - Infnite loader', () => { } const { container } = render(); const virtualScroller = container.querySelector('.MuiDataGrid-virtualScroller')!; - await sleep(1); // after initial render and a scroll event that did not reach the bottom of the grid // the `onRowsScrollEnd` should not be called expect(handleRowsScrollEnd.callCount).to.equal(0); // arbitrary number to make sure that the bottom of the grid window is reached. virtualScroller.scrollTop = 12345; virtualScroller.dispatchEvent(new Event('scroll')); - await sleep(1); - expect(handleRowsScrollEnd.callCount).to.equal(1); + await waitFor(() => { + expect(handleRowsScrollEnd.callCount).to.equal(1); + }); }); });