@instructure/ui-drilldown 8.26.4-snapshot-3 → 8.26.4-snapshot-7
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,7 +3,7 @@
|
|
|
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
|
-
## [8.26.4-snapshot-
|
|
6
|
+
## [8.26.4-snapshot-7](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.26.4-snapshot-7) (2022-07-21)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Features
|
package/es/Drilldown/index.js
CHANGED
|
@@ -243,7 +243,9 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
243
243
|
|
|
244
244
|
this.handleOptionSelect = (event, _ref5) => {
|
|
245
245
|
let id = _ref5.id;
|
|
246
|
-
const selectedOption = this.getPageChildById(id);
|
|
246
|
+
const selectedOption = this.getPageChildById(id); // TODO: this line can be removed when React 16 is no longer supported
|
|
247
|
+
|
|
248
|
+
event.persist();
|
|
247
249
|
|
|
248
250
|
if (!id || !selectedOption || selectedOption.props.disabled || event.target.getAttribute('disabled') || event.target.getAttribute('aria-disabled')) {
|
|
249
251
|
event.preventDefault();
|
package/lib/Drilldown/index.js
CHANGED
|
@@ -259,7 +259,9 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
259
259
|
|
|
260
260
|
this.handleOptionSelect = (event, _ref5) => {
|
|
261
261
|
let id = _ref5.id;
|
|
262
|
-
const selectedOption = this.getPageChildById(id);
|
|
262
|
+
const selectedOption = this.getPageChildById(id); // TODO: this line can be removed when React 16 is no longer supported
|
|
263
|
+
|
|
264
|
+
event.persist();
|
|
263
265
|
|
|
264
266
|
if (!id || !selectedOption || selectedOption.props.disabled || event.target.getAttribute('disabled') || event.target.getAttribute('aria-disabled')) {
|
|
265
267
|
event.preventDefault();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-drilldown",
|
|
3
|
-
"version": "8.26.4-snapshot-
|
|
3
|
+
"version": "8.26.4-snapshot-7",
|
|
4
4
|
"description": "A drilldown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -24,28 +24,28 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.13.10",
|
|
27
|
-
"@instructure/console": "8.26.4-snapshot-
|
|
28
|
-
"@instructure/emotion": "8.26.4-snapshot-
|
|
29
|
-
"@instructure/shared-types": "8.26.4-snapshot-
|
|
30
|
-
"@instructure/ui-dom-utils": "8.26.4-snapshot-
|
|
31
|
-
"@instructure/ui-icons": "8.26.4-snapshot-
|
|
32
|
-
"@instructure/ui-options": "8.26.4-snapshot-
|
|
33
|
-
"@instructure/ui-popover": "8.26.4-snapshot-
|
|
34
|
-
"@instructure/ui-position": "8.26.4-snapshot-
|
|
35
|
-
"@instructure/ui-prop-types": "8.26.4-snapshot-
|
|
36
|
-
"@instructure/ui-react-utils": "8.26.4-snapshot-
|
|
37
|
-
"@instructure/ui-selectable": "8.26.4-snapshot-
|
|
38
|
-
"@instructure/ui-testable": "8.26.4-snapshot-
|
|
39
|
-
"@instructure/ui-utils": "8.26.4-snapshot-
|
|
40
|
-
"@instructure/ui-view": "8.26.4-snapshot-
|
|
27
|
+
"@instructure/console": "8.26.4-snapshot-7",
|
|
28
|
+
"@instructure/emotion": "8.26.4-snapshot-7",
|
|
29
|
+
"@instructure/shared-types": "8.26.4-snapshot-7",
|
|
30
|
+
"@instructure/ui-dom-utils": "8.26.4-snapshot-7",
|
|
31
|
+
"@instructure/ui-icons": "8.26.4-snapshot-7",
|
|
32
|
+
"@instructure/ui-options": "8.26.4-snapshot-7",
|
|
33
|
+
"@instructure/ui-popover": "8.26.4-snapshot-7",
|
|
34
|
+
"@instructure/ui-position": "8.26.4-snapshot-7",
|
|
35
|
+
"@instructure/ui-prop-types": "8.26.4-snapshot-7",
|
|
36
|
+
"@instructure/ui-react-utils": "8.26.4-snapshot-7",
|
|
37
|
+
"@instructure/ui-selectable": "8.26.4-snapshot-7",
|
|
38
|
+
"@instructure/ui-testable": "8.26.4-snapshot-7",
|
|
39
|
+
"@instructure/ui-utils": "8.26.4-snapshot-7",
|
|
40
|
+
"@instructure/ui-view": "8.26.4-snapshot-7",
|
|
41
41
|
"prop-types": "^15"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@instructure/ui-babel-preset": "8.26.4-snapshot-
|
|
45
|
-
"@instructure/ui-color-utils": "8.26.4-snapshot-
|
|
46
|
-
"@instructure/ui-test-locator": "8.26.4-snapshot-
|
|
47
|
-
"@instructure/ui-test-utils": "8.26.4-snapshot-
|
|
48
|
-
"@instructure/ui-themes": "8.26.4-snapshot-
|
|
44
|
+
"@instructure/ui-babel-preset": "8.26.4-snapshot-7",
|
|
45
|
+
"@instructure/ui-color-utils": "8.26.4-snapshot-7",
|
|
46
|
+
"@instructure/ui-test-locator": "8.26.4-snapshot-7",
|
|
47
|
+
"@instructure/ui-test-utils": "8.26.4-snapshot-7",
|
|
48
|
+
"@instructure/ui-themes": "8.26.4-snapshot-7"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": ">=16.8 <=18"
|
package/src/Drilldown/README.md
CHANGED
|
@@ -1111,15 +1111,17 @@ example: true
|
|
|
1111
1111
|
shouldHideOnSelect={false}
|
|
1112
1112
|
>
|
|
1113
1113
|
<Drilldown.Page id="root" renderTitle='Should not hide on select'>
|
|
1114
|
-
<Drilldown.
|
|
1115
|
-
Option
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
Option
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
Option
|
|
1122
|
-
|
|
1114
|
+
<Drilldown.Group id="group1" selectableType='single'>
|
|
1115
|
+
<Drilldown.Option value="1" id="shouldHideOption1">
|
|
1116
|
+
Option 1
|
|
1117
|
+
</Drilldown.Option>
|
|
1118
|
+
<Drilldown.Option value="2" id="shouldHideOption2">
|
|
1119
|
+
Option 2
|
|
1120
|
+
</Drilldown.Option>
|
|
1121
|
+
<Drilldown.Option value="3" id="shouldHideOption3">
|
|
1122
|
+
Option 3
|
|
1123
|
+
</Drilldown.Option>
|
|
1124
|
+
</Drilldown.Group>
|
|
1123
1125
|
<Drilldown.Option
|
|
1124
1126
|
id="close"
|
|
1125
1127
|
renderBeforeLabel={<IconXLine />}
|
package/src/Drilldown/index.tsx
CHANGED
|
@@ -754,6 +754,9 @@ class Drilldown extends Component<DrilldownProps, DrilldownState> {
|
|
|
754
754
|
) => {
|
|
755
755
|
const selectedOption = this.getPageChildById(id)
|
|
756
756
|
|
|
757
|
+
// TODO: this line can be removed when React 16 is no longer supported
|
|
758
|
+
event.persist()
|
|
759
|
+
|
|
757
760
|
if (
|
|
758
761
|
!id ||
|
|
759
762
|
!selectedOption ||
|