@instructure/ui-drilldown 8.26.4-snapshot-5 → 8.26.4-snapshot-11

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-5](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.26.4-snapshot-5) (2022-07-19)
6
+ ## [8.26.4-snapshot-11](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.26.4-snapshot-11) (2022-07-21)
7
7
 
8
8
 
9
9
  ### Features
@@ -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();
@@ -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-5",
3
+ "version": "8.26.4-snapshot-11",
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-5",
28
- "@instructure/emotion": "8.26.4-snapshot-5",
29
- "@instructure/shared-types": "8.26.4-snapshot-5",
30
- "@instructure/ui-dom-utils": "8.26.4-snapshot-5",
31
- "@instructure/ui-icons": "8.26.4-snapshot-5",
32
- "@instructure/ui-options": "8.26.4-snapshot-5",
33
- "@instructure/ui-popover": "8.26.4-snapshot-5",
34
- "@instructure/ui-position": "8.26.4-snapshot-5",
35
- "@instructure/ui-prop-types": "8.26.4-snapshot-5",
36
- "@instructure/ui-react-utils": "8.26.4-snapshot-5",
37
- "@instructure/ui-selectable": "8.26.4-snapshot-5",
38
- "@instructure/ui-testable": "8.26.4-snapshot-5",
39
- "@instructure/ui-utils": "8.26.4-snapshot-5",
40
- "@instructure/ui-view": "8.26.4-snapshot-5",
27
+ "@instructure/console": "8.26.4-snapshot-11",
28
+ "@instructure/emotion": "8.26.4-snapshot-11",
29
+ "@instructure/shared-types": "8.26.4-snapshot-11",
30
+ "@instructure/ui-dom-utils": "8.26.4-snapshot-11",
31
+ "@instructure/ui-icons": "8.26.4-snapshot-11",
32
+ "@instructure/ui-options": "8.26.4-snapshot-11",
33
+ "@instructure/ui-popover": "8.26.4-snapshot-11",
34
+ "@instructure/ui-position": "8.26.4-snapshot-11",
35
+ "@instructure/ui-prop-types": "8.26.4-snapshot-11",
36
+ "@instructure/ui-react-utils": "8.26.4-snapshot-11",
37
+ "@instructure/ui-selectable": "8.26.4-snapshot-11",
38
+ "@instructure/ui-testable": "8.26.4-snapshot-11",
39
+ "@instructure/ui-utils": "8.26.4-snapshot-11",
40
+ "@instructure/ui-view": "8.26.4-snapshot-11",
41
41
  "prop-types": "^15"
42
42
  },
43
43
  "devDependencies": {
44
- "@instructure/ui-babel-preset": "8.26.4-snapshot-5",
45
- "@instructure/ui-color-utils": "8.26.4-snapshot-5",
46
- "@instructure/ui-test-locator": "8.26.4-snapshot-5",
47
- "@instructure/ui-test-utils": "8.26.4-snapshot-5",
48
- "@instructure/ui-themes": "8.26.4-snapshot-5"
44
+ "@instructure/ui-babel-preset": "8.26.4-snapshot-11",
45
+ "@instructure/ui-color-utils": "8.26.4-snapshot-11",
46
+ "@instructure/ui-test-locator": "8.26.4-snapshot-11",
47
+ "@instructure/ui-test-utils": "8.26.4-snapshot-11",
48
+ "@instructure/ui-themes": "8.26.4-snapshot-11"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": ">=16.8 <=18"
@@ -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.Option id="shouldHideOption1">
1115
- Option
1116
- </Drilldown.Option>
1117
- <Drilldown.Option id="shouldHideOption2">
1118
- Option
1119
- </Drilldown.Option>
1120
- <Drilldown.Option id="shouldHideOption3">
1121
- Option
1122
- </Drilldown.Option>
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 />}
@@ -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 ||