@mui/x-data-grid 6.3.0 → 6.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,52 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.3.1
7
+
8
+ _May 5, 2023_
9
+
10
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🐞 Bugfixes
13
+ - 📚 Documentation improvements
14
+
15
+ ### `@mui/x-data-grid@v6.3.1` / `@mui/x-data-grid-pro@v6.3.1` / `@mui/x-data-grid-premium@v6.3.1`
16
+
17
+ #### Changes
18
+
19
+ - [DataGrid] Fix broken filtering in the value formatter demo (#8621) @cherniavskii
20
+ - [DataGrid] Fix falsy filter values not showing in filter button tooltip (#8550) @ithrforu
21
+ - [DataGrid] Fix missing watermark in Pro and Premium packages (#8797) @cherniavskii
22
+ - [DataGrid] Remove unwarranted warning log (#8847) @romgrk
23
+ - [DataGrid] Add Joy UI slots (`Select`, `SelectOption`, `InputLabel`, `FormControl`) (#8747) @cherniavskii
24
+ - [DataGridPremium] Fix expanded groups being collapsed after calling `updateRows` (#8823) @cherniavskii
25
+
26
+ ### `@mui/x-date-pickers@v6.3.1` / `@mui/x-date-pickers-pro@v6.3.1`
27
+
28
+ #### Changes
29
+
30
+ - [pickers] Fix `minutesStep` validation prop behavior (#8794) @LukasTy
31
+ - [pickers] Fix time picker `viewRenderers` overriding (#8830) @LukasTy
32
+ - [pickers] Remove last additional character when using LTR (#8848) @alexfauquette
33
+
34
+ ### Docs
35
+
36
+ - [docs] Fix controlled mode demo on Editing page (#8800) @yaredtsy
37
+ - [docs] Fix scrolling demo not working with React 18 (#6489) @cherniavskii
38
+ - [docs] Update demo to support agregation on popular feature cell (#8617) @BalaM314
39
+ - [docs] Clarify what `<path>` is (#8764) @alexfauquette
40
+
41
+ ### Core
42
+
43
+ - [core] Do not include playground pages in `yarn typescript` script (#8822) @cherniavskii
44
+ - [core] Limit `typescript:ci` step memory limit (#8796) @LukasTy
45
+ - [core] Upgrade monorepo (#8835) @cherniavskii
46
+ - [test] Use `fake` clock on `MobileDateRangePicker` (#8861) @LukasTy
47
+ - [charts] Clean some styling (#8778) @alexfauquette
48
+ - [charts] Improve tooltip (#8792) @alexfauquette
49
+ - [charts] Improvement and docs on axis (#8654) @alexfauquette
50
+ - [charts] Defaultize attributes (#8788) @alexfauquette
51
+
6
52
  ## 6.3.0
7
53
 
8
54
  _Apr 28, 2023_
@@ -264,9 +310,9 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
264
310
 
265
311
  - [fields] Add missing tokens to `AdapterDateFnsJalali` (#8402) @flaviendelangle
266
312
  - [fields] Clean the active date manager (#8370) @flaviendelangle
267
- - [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
313
+ - [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
268
314
  - [fields] Only add RTL characters when needed (#8325) @flaviendelangle
269
- - [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
315
+ - [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
270
316
  - [pickers] Allows non token characters in format (#8256) @alexfauquette
271
317
  - [pickers] Avoid root imports and move public models to the models folder (#8337) @flaviendelangle
272
318
  - [pickers] Update `view` when `views` or `openTo` changes (#8361) @LukasTy
@@ -43,9 +43,11 @@ export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginat
43
43
  apiRef.current.setPage(page);
44
44
  }, [apiRef]);
45
45
  if (process.env.NODE_ENV !== 'production') {
46
+ var _rootProps$pagination, _rootProps$pagination2;
46
47
  // eslint-disable-next-line react-hooks/rules-of-hooks
47
48
  const warnedOnceMissingInPageSizeOptions = React.useRef(false);
48
- if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !rootProps.pageSizeOptions.includes(paginationModel.pageSize)) {
49
+ const pageSize = (_rootProps$pagination = (_rootProps$pagination2 = rootProps.paginationModel) == null ? void 0 : _rootProps$pagination2.pageSize) != null ? _rootProps$pagination : paginationModel.pageSize;
50
+ if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !rootProps.pageSizeOptions.includes(pageSize)) {
49
51
  console.warn([`MUI: The page size \`${paginationModel.pageSize}\` is not preset in the \`pageSizeOptions\``, `Add it to show the pagination select.`].join('\n'));
50
52
  warnedOnceMissingInPageSizeOptions.current = true;
51
53
  }
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  interface GridBodyProps {
3
+ children?: React.ReactNode;
3
4
  ColumnHeadersProps?: Record<string, any>;
4
5
  VirtualScrollerComponent: React.JSXElementConstructor<React.HTMLAttributes<HTMLDivElement> & {
5
6
  ref: React.Ref<HTMLDivElement>;
@@ -18,7 +18,8 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
18
18
  function GridBody(props) {
19
19
  const {
20
20
  VirtualScrollerComponent,
21
- ColumnHeadersProps
21
+ ColumnHeadersProps,
22
+ children
22
23
  } = props;
23
24
  const apiRef = useGridPrivateApiContext();
24
25
  const rootProps = useGridRootProps();
@@ -119,7 +120,7 @@ function GridBody(props) {
119
120
  , {
120
121
  ref: virtualScrollerRef,
121
122
  disableVirtualization: isVirtualizationDisabled
122
- })]
123
+ }), children]
123
124
  });
124
125
  }
125
126
  process.env.NODE_ENV !== "production" ? GridBody.propTypes = {
@@ -127,6 +128,7 @@ process.env.NODE_ENV !== "production" ? GridBody.propTypes = {
127
128
  // | These PropTypes are generated from the TypeScript type definitions |
128
129
  // | To update them edit the TypeScript types and run "yarn proptypes" |
129
130
  // ----------------------------------------------------------------------
131
+ children: PropTypes.node,
130
132
  ColumnHeadersProps: PropTypes.object,
131
133
  VirtualScrollerComponent: PropTypes.elementType.isRequired
132
134
  } : void 0;
@@ -16,7 +16,8 @@ export interface GridPanelProps extends Partial<React.ComponentProps<typeof Grid
16
16
  open: boolean;
17
17
  }
18
18
  export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
19
- declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<Omit<import("@mui/base").PopperProps<"div", {}>, "direction"> & {
19
+ declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<Omit<import("@mui/base").PopperProps<"div">, "direction"> & {
20
+ component?: React.ElementType<any> | undefined;
20
21
  components?: {
21
22
  Root?: React.ElementType<any> | undefined;
22
23
  } | undefined;
@@ -69,7 +69,9 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
69
69
  children: activeFilters.map((item, index) => _extends({}, lookup[item.field] && /*#__PURE__*/_jsx("li", {
70
70
  children: `${lookup[item.field].headerName || item.field}
71
71
  ${getOperatorLabel(item)}
72
- ${item.value ? getFilterItemValue(item) : ''}`
72
+ ${
73
+ // implicit check for null and undefined
74
+ item.value != null ? getFilterItemValue(item) : ''}`
73
75
  }, index)))
74
76
  })]
75
77
  });
@@ -298,9 +298,9 @@ export const useGridFocus = (apiRef, props) => {
298
298
  useGridApiMethod(apiRef, focusPrivateApi, 'private');
299
299
  React.useEffect(() => {
300
300
  const doc = ownerDocument(apiRef.current.rootElementRef.current);
301
- doc.addEventListener('click', handleDocumentClick);
301
+ doc.addEventListener('mouseup', handleDocumentClick);
302
302
  return () => {
303
- doc.removeEventListener('click', handleDocumentClick);
303
+ doc.removeEventListener('mouseup', handleDocumentClick);
304
304
  };
305
305
  }, [apiRef, handleDocumentClick]);
306
306
  useGridApiEventHandler(apiRef, 'columnHeaderBlur', handleBlur);
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.3.0
2
+ * @mui/x-data-grid v6.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/joy/joySlots.js CHANGED
@@ -1,9 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"],
4
- _excluded2 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
5
- _excluded3 = ["color", "size", "sx"],
6
- _excluded4 = ["name", "checkedIcon", "color", "disableRipple", "disableFocusRipple", "disableTouchRipple", "edge", "icon", "inputProps", "inputRef", "size", "sx", "onChange", "onClick"];
4
+ _excluded2 = ["onChange", "label", "placeholder", "value", "inputRef", "type", "size", "variant"],
5
+ _excluded3 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
6
+ _excluded4 = ["color", "size", "sx", "touchRippleRef"],
7
+ _excluded5 = ["name", "checkedIcon", "color", "disableRipple", "disableFocusRipple", "disableTouchRipple", "edge", "icon", "inputProps", "inputRef", "size", "sx", "onChange", "onClick"],
8
+ _excluded6 = ["open", "onOpen", "value", "onChange", "size", "color", "variant", "inputProps", "MenuProps", "inputRef", "error", "native", "fullWidth", "labelId"],
9
+ _excluded7 = ["native"],
10
+ _excluded8 = ["shrink", "variant", "sx"];
7
11
  import * as React from 'react';
8
12
  import JoyCheckbox from '@mui/joy/Checkbox';
9
13
  import JoyInput from '@mui/joy/Input';
@@ -12,6 +16,9 @@ import JoyFormLabel from '@mui/joy/FormLabel';
12
16
  import JoyButton from '@mui/joy/Button';
13
17
  import JoyIconButton from '@mui/joy/IconButton';
14
18
  import JoySwitch from '@mui/joy/Switch';
19
+ import JoySelect from '@mui/joy/Select';
20
+ import JoyOption from '@mui/joy/Option';
21
+ import { unstable_useForkRef as useForkRef } from '@mui/utils';
15
22
  import { jsx as _jsx } from "react/jsx-runtime";
16
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
24
  function convertColor(color) {
@@ -33,14 +40,17 @@ function convertSize(size) {
33
40
  large: 'lg'
34
41
  }[size] : size;
35
42
  }
36
- function convertVariant(variant) {
37
- return variant ? {
43
+ function convertVariant(variant, defaultVariant = 'plain') {
44
+ if (!variant) {
45
+ return defaultVariant;
46
+ }
47
+ return {
48
+ standard: 'outlined',
38
49
  outlined: 'outlined',
39
50
  contained: 'solid',
40
51
  text: 'plain',
41
- standard: 'plain',
42
52
  filled: 'soft'
43
- }[variant] : variant;
53
+ }[variant] || defaultVariant;
44
54
  }
45
55
  const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
46
56
  let {
@@ -61,37 +71,47 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
61
71
  onChange: onChange
62
72
  }));
63
73
  });
64
- const TextField = /*#__PURE__*/React.forwardRef(({
65
- onChange,
66
- label,
67
- placeholder,
68
- value,
69
- inputRef,
70
- type
71
- }, ref) => {
74
+ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
75
+ var _props$InputProps, _props$inputProps;
76
+ let {
77
+ onChange,
78
+ label,
79
+ placeholder,
80
+ value,
81
+ inputRef,
82
+ type,
83
+ size,
84
+ variant
85
+ } = _ref2,
86
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
87
+ const rootRef = useForkRef(ref, (_props$InputProps = props.InputProps) == null ? void 0 : _props$InputProps.ref);
88
+ const inputForkRef = useForkRef(inputRef, props == null ? void 0 : (_props$inputProps = props.inputProps) == null ? void 0 : _props$inputProps.ref);
89
+ const {
90
+ startAdornment,
91
+ endAdornment
92
+ } = props.InputProps || {};
72
93
  return /*#__PURE__*/_jsxs(JoyFormControl, {
73
- ref: ref,
94
+ ref: rootRef,
74
95
  children: [/*#__PURE__*/_jsx(JoyFormLabel, {
75
- sx: {
76
- fontSize: 12
77
- },
78
96
  children: label
79
97
  }), /*#__PURE__*/_jsx(JoyInput, {
80
98
  type: type,
81
99
  value: value,
82
100
  onChange: onChange,
83
101
  placeholder: placeholder,
84
- size: "sm",
102
+ variant: convertVariant(variant, 'outlined'),
103
+ size: convertSize(size),
85
104
  slotProps: {
86
- input: {
87
- ref: inputRef
88
- }
89
- }
105
+ input: _extends({}, props == null ? void 0 : props.inputProps, {
106
+ ref: inputForkRef
107
+ })
108
+ },
109
+ startDecorator: startAdornment,
110
+ endDecorator: endAdornment
90
111
  })]
91
112
  });
92
113
  });
93
- const Button = /*#__PURE__*/React.forwardRef(function Button(_ref2, ref) {
94
- var _convertVariant;
114
+ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
95
115
  let {
96
116
  startIcon,
97
117
  color,
@@ -99,26 +119,26 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref2, ref) {
99
119
  size,
100
120
  sx,
101
121
  variant
102
- } = _ref2,
103
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
122
+ } = _ref3,
123
+ props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
104
124
  return /*#__PURE__*/_jsx(JoyButton, _extends({}, props, {
105
125
  size: convertSize(size),
106
126
  color: convertColor(color),
107
- variant: (_convertVariant = convertVariant(variant)) != null ? _convertVariant : 'plain',
127
+ variant: convertVariant(variant),
108
128
  ref: ref,
109
129
  startDecorator: startIcon,
110
130
  endDecorator: endIcon,
111
131
  sx: sx
112
132
  }));
113
133
  });
114
- const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref3, ref) {
134
+ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref4, ref) {
115
135
  var _convertColor;
116
136
  let {
117
137
  color,
118
138
  size,
119
139
  sx
120
- } = _ref3,
121
- props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
140
+ } = _ref4,
141
+ props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
122
142
  return /*#__PURE__*/_jsx(JoyIconButton, _extends({}, props, {
123
143
  size: convertSize(size),
124
144
  color: (_convertColor = convertColor(color)) != null ? _convertColor : 'neutral',
@@ -127,7 +147,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref3, ref)
127
147
  sx: sx
128
148
  }));
129
149
  });
130
- const Switch = /*#__PURE__*/React.forwardRef(function Switch(_ref4, ref) {
150
+ const Switch = /*#__PURE__*/React.forwardRef(function Switch(_ref5, ref) {
131
151
  let {
132
152
  name,
133
153
  color: colorProp,
@@ -139,8 +159,8 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(_ref4, ref) {
139
159
  sx,
140
160
  onChange,
141
161
  onClick
142
- } = _ref4,
143
- props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
162
+ } = _ref5,
163
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
144
164
  return /*#__PURE__*/_jsx(JoySwitch, _extends({}, props, {
145
165
  onChange: onChange,
146
166
  size: convertSize(size),
@@ -163,15 +183,97 @@ const Switch = /*#__PURE__*/React.forwardRef(function Switch(_ref4, ref) {
163
183
  }), ...(Array.isArray(sx) ? sx : [sx])]
164
184
  }));
165
185
  });
186
+ const Select = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
187
+ let {
188
+ open,
189
+ onOpen,
190
+ value,
191
+ onChange,
192
+ size,
193
+ color,
194
+ variant,
195
+ MenuProps,
196
+ inputRef,
197
+ labelId
198
+ } = _ref6,
199
+ props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
200
+ const handleChange = (event, newValue) => {
201
+ if (event && onChange) {
202
+ // Same as in https://github.com/mui/material-ui/blob/e5558282a8f36856aef1299f3a36f3235e92e770/packages/mui-material/src/Select/SelectInput.js#L288-L300
203
+
204
+ // Redefine target to allow name and value to be read.
205
+ // This allows seamless integration with the most popular form libraries.
206
+ // https://github.com/mui/material-ui/issues/13485#issuecomment-676048492
207
+ // Clone the event to not override `target` of the original event.
208
+ const nativeEvent = event.nativeEvent || event;
209
+ // @ts-ignore The nativeEvent is function, not object
210
+ const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
211
+ Object.defineProperty(clonedEvent, 'target', {
212
+ writable: true,
213
+ value: {
214
+ value: newValue,
215
+ name: props.name
216
+ }
217
+ });
218
+ onChange(clonedEvent, null);
219
+ }
220
+ };
221
+ return /*#__PURE__*/_jsx(JoySelect, _extends({}, props, {
222
+ listboxOpen: open,
223
+ onListboxOpenChange: isOpen => {
224
+ if (isOpen) {
225
+ onOpen == null ? void 0 : onOpen({});
226
+ } else {
227
+ var _MenuProps$onClose;
228
+ MenuProps == null ? void 0 : (_MenuProps$onClose = MenuProps.onClose) == null ? void 0 : _MenuProps$onClose.call(MenuProps, {}, undefined);
229
+ }
230
+ },
231
+ size: convertSize(size),
232
+ color: convertColor(color),
233
+ variant: convertVariant(variant, 'outlined'),
234
+ ref: ref,
235
+ value: value,
236
+ onChange: handleChange,
237
+ slotProps: {
238
+ button: {
239
+ 'aria-labelledby': labelId,
240
+ ref: inputRef
241
+ },
242
+ listbox: {
243
+ disablePortal: false,
244
+ sx: {
245
+ zIndex: 1350
246
+ }
247
+ }
248
+ }
249
+ }));
250
+ });
251
+ const Option = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
252
+ let props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
253
+ return /*#__PURE__*/_jsx(JoyOption, _extends({}, props, {
254
+ ref: ref
255
+ }));
256
+ });
257
+ const InputLabel = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
258
+ let {
259
+ sx
260
+ } = _ref8,
261
+ props = _objectWithoutPropertiesLoose(_ref8, _excluded8);
262
+ return /*#__PURE__*/_jsx(JoyFormLabel, _extends({}, props, {
263
+ ref: ref,
264
+ sx: sx
265
+ }));
266
+ });
166
267
  const joySlots = {
167
268
  baseCheckbox: Checkbox,
168
269
  baseTextField: TextField,
169
270
  baseButton: Button,
170
271
  baseIconButton: IconButton,
171
- baseSwitch: Switch
172
- // BaseFormControl: MUIFormControl,
173
- // baseSelect: Select,
174
- // baseSelectOption: Option,
272
+ baseSwitch: Switch,
273
+ baseSelect: Select,
274
+ baseSelectOption: Option,
275
+ baseInputLabel: InputLabel,
276
+ baseFormControl: JoyFormControl
175
277
  // BaseTooltip: MUITooltip,
176
278
  // BasePopper: MUIPopper,
177
279
  };
@@ -43,9 +43,11 @@ export var GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginatio
43
43
  apiRef.current.setPage(page);
44
44
  }, [apiRef]);
45
45
  if (process.env.NODE_ENV !== 'production') {
46
+ var _rootProps$pagination, _rootProps$pagination2;
46
47
  // eslint-disable-next-line react-hooks/rules-of-hooks
47
48
  var warnedOnceMissingInPageSizeOptions = React.useRef(false);
48
- if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !rootProps.pageSizeOptions.includes(paginationModel.pageSize)) {
49
+ var pageSize = (_rootProps$pagination = (_rootProps$pagination2 = rootProps.paginationModel) == null ? void 0 : _rootProps$pagination2.pageSize) != null ? _rootProps$pagination : paginationModel.pageSize;
50
+ if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !rootProps.pageSizeOptions.includes(pageSize)) {
49
51
  console.warn(["MUI: The page size `".concat(paginationModel.pageSize, "` is not preset in the `pageSizeOptions`"), "Add it to show the pagination select."].join('\n'));
50
52
  warnedOnceMissingInPageSizeOptions.current = true;
51
53
  }
@@ -18,7 +18,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
18
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
19
  function GridBody(props) {
20
20
  var VirtualScrollerComponent = props.VirtualScrollerComponent,
21
- ColumnHeadersProps = props.ColumnHeadersProps;
21
+ ColumnHeadersProps = props.ColumnHeadersProps,
22
+ children = props.children;
22
23
  var apiRef = useGridPrivateApiContext();
23
24
  var rootProps = useGridRootProps();
24
25
  var rootRef = React.useRef(null);
@@ -121,7 +122,7 @@ function GridBody(props) {
121
122
  , {
122
123
  ref: virtualScrollerRef,
123
124
  disableVirtualization: isVirtualizationDisabled
124
- })]
125
+ }), children]
125
126
  });
126
127
  }
127
128
  process.env.NODE_ENV !== "production" ? GridBody.propTypes = {
@@ -129,6 +130,7 @@ process.env.NODE_ENV !== "production" ? GridBody.propTypes = {
129
130
  // | These PropTypes are generated from the TypeScript type definitions |
130
131
  // | To update them edit the TypeScript types and run "yarn proptypes" |
131
132
  // ----------------------------------------------------------------------
133
+ children: PropTypes.node,
132
134
  ColumnHeadersProps: PropTypes.object,
133
135
  VirtualScrollerComponent: PropTypes.elementType.isRequired
134
136
  } : void 0;
@@ -73,7 +73,9 @@ var GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolbar
73
73
  ownerState: rootProps,
74
74
  children: activeFilters.map(function (item, index) {
75
75
  return _extends({}, lookup[item.field] && /*#__PURE__*/_jsx("li", {
76
- children: "".concat(lookup[item.field].headerName || item.field, "\n ").concat(getOperatorLabel(item), "\n ").concat(item.value ? getFilterItemValue(item) : '')
76
+ children: "".concat(lookup[item.field].headerName || item.field, "\n ").concat(getOperatorLabel(item), "\n ").concat(
77
+ // implicit check for null and undefined
78
+ item.value != null ? getFilterItemValue(item) : '')
77
79
  }, index));
78
80
  })
79
81
  })]
@@ -307,9 +307,9 @@ export var useGridFocus = function useGridFocus(apiRef, props) {
307
307
  useGridApiMethod(apiRef, focusPrivateApi, 'private');
308
308
  React.useEffect(function () {
309
309
  var doc = ownerDocument(apiRef.current.rootElementRef.current);
310
- doc.addEventListener('click', handleDocumentClick);
310
+ doc.addEventListener('mouseup', handleDocumentClick);
311
311
  return function () {
312
- doc.removeEventListener('click', handleDocumentClick);
312
+ doc.removeEventListener('mouseup', handleDocumentClick);
313
313
  };
314
314
  }, [apiRef, handleDocumentClick]);
315
315
  useGridApiEventHandler(apiRef, 'columnHeaderBlur', handleBlur);
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.3.0
2
+ * @mui/x-data-grid v6.3.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the