@mui/x-date-pickers 6.19.8 → 6.19.9
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 +42 -0
- package/index.js +1 -1
- package/internals/hooks/useField/useField.js +5 -4
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useField/useField.js +5 -4
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useField/useField.js +2 -1
- package/node/index.js +1 -1
- package/node/internals/hooks/useField/useField.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
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.19.9
|
|
7
|
+
|
|
8
|
+
_Apr 5, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🐞 Bugfixes
|
|
13
|
+
- 📚 Documentation improvements
|
|
14
|
+
|
|
15
|
+
### Data Grid
|
|
16
|
+
|
|
17
|
+
#### `@mui/x-data-grid@6.19.9`
|
|
18
|
+
|
|
19
|
+
- [DataGrid] Remove legacy editing API event: `rowEditCommit` (#12087) @MBilalShafi
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid-pro@6.19.9` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
22
|
+
|
|
23
|
+
Same changes as in `@mui/x-data-grid@6.19.9`.
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid-premium@6.19.9` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
26
|
+
|
|
27
|
+
Same changes as in `@mui/x-data-grid-pro@6.19.9`.
|
|
28
|
+
|
|
29
|
+
### Date Pickers
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-date-pickers@6.19.9`
|
|
32
|
+
|
|
33
|
+
No changes.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-date-pickers-pro@6.19.9` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
36
|
+
|
|
37
|
+
- [DateRangePicker] Fix selection behavior with single input field when `readOnly` (#12605) @LukasTy
|
|
38
|
+
|
|
39
|
+
### Docs
|
|
40
|
+
|
|
41
|
+
- [docs] Adds a recipe for the `checkboxSelectionVisibleOnly` prop (#12667) @michelengelen
|
|
42
|
+
- [docs] Explain the use of `_action: 'delete'` in `processRowUpdate` (#12673) @michelengelen
|
|
43
|
+
|
|
44
|
+
### Core
|
|
45
|
+
|
|
46
|
+
- [core] Use Circle CI context (#12607) @cherniavskii
|
|
47
|
+
|
|
6
48
|
## 6.19.8
|
|
7
49
|
|
|
8
50
|
_Mar 20, 2024_
|
package/index.js
CHANGED
|
@@ -403,10 +403,11 @@ export const useField = params => {
|
|
|
403
403
|
React.useImperativeHandle(unstableFieldRef, () => ({
|
|
404
404
|
getSections: () => state.sections,
|
|
405
405
|
getActiveSectionIndex: () => {
|
|
406
|
-
var _selectionStart2, _selectionEnd;
|
|
406
|
+
var _selectionStart2, _selectionEnd, _inputRef$current;
|
|
407
407
|
const browserStartIndex = (_selectionStart2 = inputRef.current.selectionStart) != null ? _selectionStart2 : 0;
|
|
408
408
|
const browserEndIndex = (_selectionEnd = inputRef.current.selectionEnd) != null ? _selectionEnd : 0;
|
|
409
|
-
|
|
409
|
+
const isInputReadOnly = !!((_inputRef$current = inputRef.current) != null && _inputRef$current.readOnly);
|
|
410
|
+
if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
|
|
410
411
|
return null;
|
|
411
412
|
}
|
|
412
413
|
const nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
|
|
@@ -416,11 +417,11 @@ export const useField = params => {
|
|
|
416
417
|
setSelectedSections: activeSectionIndex => setSelectedSections(activeSectionIndex)
|
|
417
418
|
}));
|
|
418
419
|
const handleClearValue = useEventCallback((event, ...args) => {
|
|
419
|
-
var _inputRef$
|
|
420
|
+
var _inputRef$current2;
|
|
420
421
|
event.preventDefault();
|
|
421
422
|
onClear == null || onClear(event, ...args);
|
|
422
423
|
clearValue();
|
|
423
|
-
inputRef == null || (_inputRef$
|
|
424
|
+
inputRef == null || (_inputRef$current2 = inputRef.current) == null || _inputRef$current2.focus();
|
|
424
425
|
setSelectedSections(0);
|
|
425
426
|
});
|
|
426
427
|
return _extends({
|
package/legacy/index.js
CHANGED
|
@@ -417,10 +417,11 @@ export var useField = function useField(params) {
|
|
|
417
417
|
return state.sections;
|
|
418
418
|
},
|
|
419
419
|
getActiveSectionIndex: function getActiveSectionIndex() {
|
|
420
|
-
var _selectionStart2, _selectionEnd;
|
|
420
|
+
var _selectionStart2, _selectionEnd, _inputRef$current;
|
|
421
421
|
var browserStartIndex = (_selectionStart2 = inputRef.current.selectionStart) != null ? _selectionStart2 : 0;
|
|
422
422
|
var browserEndIndex = (_selectionEnd = inputRef.current.selectionEnd) != null ? _selectionEnd : 0;
|
|
423
|
-
|
|
423
|
+
var isInputReadOnly = !!((_inputRef$current = inputRef.current) != null && _inputRef$current.readOnly);
|
|
424
|
+
if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
|
|
424
425
|
return null;
|
|
425
426
|
}
|
|
426
427
|
var nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
|
|
@@ -435,14 +436,14 @@ export var useField = function useField(params) {
|
|
|
435
436
|
};
|
|
436
437
|
});
|
|
437
438
|
var handleClearValue = useEventCallback(function (event) {
|
|
438
|
-
var _inputRef$
|
|
439
|
+
var _inputRef$current2;
|
|
439
440
|
event.preventDefault();
|
|
440
441
|
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
441
442
|
args[_key4 - 1] = arguments[_key4];
|
|
442
443
|
}
|
|
443
444
|
onClear == null || onClear.apply(void 0, [event].concat(_toConsumableArray(args)));
|
|
444
445
|
clearValue();
|
|
445
|
-
inputRef == null || (_inputRef$
|
|
446
|
+
inputRef == null || (_inputRef$current2 = inputRef.current) == null || _inputRef$current2.focus();
|
|
446
447
|
_setSelectedSections(0);
|
|
447
448
|
});
|
|
448
449
|
return _extends({
|
package/modern/index.js
CHANGED
|
@@ -401,7 +401,8 @@ export const useField = params => {
|
|
|
401
401
|
getActiveSectionIndex: () => {
|
|
402
402
|
const browserStartIndex = inputRef.current.selectionStart ?? 0;
|
|
403
403
|
const browserEndIndex = inputRef.current.selectionEnd ?? 0;
|
|
404
|
-
|
|
404
|
+
const isInputReadOnly = !!inputRef.current?.readOnly;
|
|
405
|
+
if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
|
|
405
406
|
return null;
|
|
406
407
|
}
|
|
407
408
|
const nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
|
package/node/index.js
CHANGED
|
@@ -410,7 +410,8 @@ const useField = params => {
|
|
|
410
410
|
getActiveSectionIndex: () => {
|
|
411
411
|
const browserStartIndex = inputRef.current.selectionStart ?? 0;
|
|
412
412
|
const browserEndIndex = inputRef.current.selectionEnd ?? 0;
|
|
413
|
-
|
|
413
|
+
const isInputReadOnly = !!inputRef.current?.readOnly;
|
|
414
|
+
if (browserStartIndex === 0 && browserEndIndex === 0 || isInputReadOnly) {
|
|
414
415
|
return null;
|
|
415
416
|
}
|
|
416
417
|
const nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.
|