@mui/x-date-pickers 6.20.1 → 6.20.2
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 +15 -0
- package/index.js +1 -1
- package/internals/hooks/useField/useFieldCharacterEditing.js +1 -1
- package/internals/hooks/usePicker/usePickerViews.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/hooks/useField/useFieldCharacterEditing.js +1 -1
- package/legacy/internals/hooks/usePicker/usePickerViews.js +3 -2
- package/modern/index.js +1 -1
- package/modern/internals/hooks/useField/useFieldCharacterEditing.js +1 -1
- package/modern/internals/hooks/usePicker/usePickerViews.js +2 -1
- package/node/index.js +1 -1
- package/node/internals/hooks/useField/useFieldCharacterEditing.js +1 -1
- package/node/internals/hooks/usePicker/usePickerViews.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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.20.2
|
|
7
|
+
|
|
8
|
+
_Jun 20, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🐞 Bugfixes
|
|
13
|
+
|
|
14
|
+
### Date Pickers
|
|
15
|
+
|
|
16
|
+
#### `@mui/x-date-pickers@6.20.2`
|
|
17
|
+
|
|
18
|
+
- [fields] Do not apply digit editing when pressing `Space` (#13516) @flaviendelangle
|
|
19
|
+
- [pickers] Fix controlled `view` behavior (#13559) @LukasTy
|
|
20
|
+
|
|
6
21
|
## 6.20.1
|
|
7
22
|
|
|
8
23
|
_Jun 6, 2024_
|
package/index.js
CHANGED
|
@@ -236,7 +236,7 @@ export const useFieldCharacterEditing = ({
|
|
|
236
236
|
};
|
|
237
237
|
const applyCharacterEditing = useEventCallback(params => {
|
|
238
238
|
const activeSection = sections[params.sectionIndex];
|
|
239
|
-
const isNumericEditing = !Number.isNaN(Number(params.keyPressed));
|
|
239
|
+
const isNumericEditing = params.keyPressed !== ' ' && !Number.isNaN(Number(params.keyPressed));
|
|
240
240
|
const response = isNumericEditing ? applyNumericEditing(params) : applyLetterEditing(params);
|
|
241
241
|
if (response == null) {
|
|
242
242
|
setTempAndroidValueStr(null);
|
|
@@ -39,6 +39,7 @@ export const usePickerViews = ({
|
|
|
39
39
|
onClose
|
|
40
40
|
} = propsFromPickerValue;
|
|
41
41
|
const {
|
|
42
|
+
view: inView,
|
|
42
43
|
views,
|
|
43
44
|
openTo,
|
|
44
45
|
onViewChange,
|
|
@@ -54,7 +55,7 @@ export const usePickerViews = ({
|
|
|
54
55
|
setFocusedView,
|
|
55
56
|
setValueAndGoToNextView
|
|
56
57
|
} = useViews({
|
|
57
|
-
view:
|
|
58
|
+
view: inView,
|
|
58
59
|
views,
|
|
59
60
|
openTo,
|
|
60
61
|
onChange,
|
package/legacy/index.js
CHANGED
|
@@ -254,7 +254,7 @@ export var useFieldCharacterEditing = function useFieldCharacterEditing(_ref) {
|
|
|
254
254
|
};
|
|
255
255
|
var applyCharacterEditing = useEventCallback(function (params) {
|
|
256
256
|
var activeSection = sections[params.sectionIndex];
|
|
257
|
-
var isNumericEditing = !Number.isNaN(Number(params.keyPressed));
|
|
257
|
+
var isNumericEditing = params.keyPressed !== ' ' && !Number.isNaN(Number(params.keyPressed));
|
|
258
258
|
var response = isNumericEditing ? applyNumericEditing(params) : applyLetterEditing(params);
|
|
259
259
|
if (response == null) {
|
|
260
260
|
setTempAndroidValueStr(null);
|
|
@@ -36,7 +36,8 @@ export var usePickerViews = function usePickerViews(_ref) {
|
|
|
36
36
|
open = propsFromPickerValue.open,
|
|
37
37
|
onSelectedSectionsChange = propsFromPickerValue.onSelectedSectionsChange,
|
|
38
38
|
onClose = propsFromPickerValue.onClose;
|
|
39
|
-
var
|
|
39
|
+
var inView = props.view,
|
|
40
|
+
views = props.views,
|
|
40
41
|
openTo = props.openTo,
|
|
41
42
|
onViewChange = props.onViewChange,
|
|
42
43
|
viewRenderers = props.viewRenderers,
|
|
@@ -45,7 +46,7 @@ export var usePickerViews = function usePickerViews(_ref) {
|
|
|
45
46
|
sx = props.sx,
|
|
46
47
|
propsToForwardToView = _objectWithoutProperties(props, _excluded);
|
|
47
48
|
var _useViews = useViews({
|
|
48
|
-
view:
|
|
49
|
+
view: inView,
|
|
49
50
|
views: views,
|
|
50
51
|
openTo: openTo,
|
|
51
52
|
onChange: onChange,
|
package/modern/index.js
CHANGED
|
@@ -235,7 +235,7 @@ export const useFieldCharacterEditing = ({
|
|
|
235
235
|
};
|
|
236
236
|
const applyCharacterEditing = useEventCallback(params => {
|
|
237
237
|
const activeSection = sections[params.sectionIndex];
|
|
238
|
-
const isNumericEditing = !Number.isNaN(Number(params.keyPressed));
|
|
238
|
+
const isNumericEditing = params.keyPressed !== ' ' && !Number.isNaN(Number(params.keyPressed));
|
|
239
239
|
const response = isNumericEditing ? applyNumericEditing(params) : applyLetterEditing(params);
|
|
240
240
|
if (response == null) {
|
|
241
241
|
setTempAndroidValueStr(null);
|
|
@@ -39,6 +39,7 @@ export const usePickerViews = ({
|
|
|
39
39
|
onClose
|
|
40
40
|
} = propsFromPickerValue;
|
|
41
41
|
const {
|
|
42
|
+
view: inView,
|
|
42
43
|
views,
|
|
43
44
|
openTo,
|
|
44
45
|
onViewChange,
|
|
@@ -54,7 +55,7 @@ export const usePickerViews = ({
|
|
|
54
55
|
setFocusedView,
|
|
55
56
|
setValueAndGoToNextView
|
|
56
57
|
} = useViews({
|
|
57
|
-
view:
|
|
58
|
+
view: inView,
|
|
58
59
|
views,
|
|
59
60
|
openTo,
|
|
60
61
|
onChange,
|
package/node/index.js
CHANGED
|
@@ -243,7 +243,7 @@ const useFieldCharacterEditing = ({
|
|
|
243
243
|
};
|
|
244
244
|
const applyCharacterEditing = (0, _useEventCallback.default)(params => {
|
|
245
245
|
const activeSection = sections[params.sectionIndex];
|
|
246
|
-
const isNumericEditing = !Number.isNaN(Number(params.keyPressed));
|
|
246
|
+
const isNumericEditing = params.keyPressed !== ' ' && !Number.isNaN(Number(params.keyPressed));
|
|
247
247
|
const response = isNumericEditing ? applyNumericEditing(params) : applyLetterEditing(params);
|
|
248
248
|
if (response == null) {
|
|
249
249
|
setTempAndroidValueStr(null);
|
|
@@ -47,6 +47,7 @@ const usePickerViews = ({
|
|
|
47
47
|
onClose
|
|
48
48
|
} = propsFromPickerValue;
|
|
49
49
|
const {
|
|
50
|
+
view: inView,
|
|
50
51
|
views,
|
|
51
52
|
openTo,
|
|
52
53
|
onViewChange,
|
|
@@ -62,7 +63,7 @@ const usePickerViews = ({
|
|
|
62
63
|
setFocusedView,
|
|
63
64
|
setValueAndGoToNextView
|
|
64
65
|
} = (0, _useViews.useViews)({
|
|
65
|
-
view:
|
|
66
|
+
view: inView,
|
|
66
67
|
views,
|
|
67
68
|
openTo,
|
|
68
69
|
onChange,
|