@atlaskit/react-select 1.0.3 → 1.0.4
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 +9 -0
- package/dist/cjs/select.js +6 -1
- package/dist/es2019/select.js +6 -1
- package/dist/esm/select.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/react-select
|
|
2
2
|
|
|
3
|
+
## 1.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#150410](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150410)
|
|
8
|
+
[`010ae8c2986e6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/010ae8c2986e6) -
|
|
9
|
+
If select is within react-beatiful-dnd, don't prevent onMouseDown event to fix select is not
|
|
10
|
+
clickable in dnd
|
|
11
|
+
|
|
3
12
|
## 1.0.3
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/select.js
CHANGED
|
@@ -453,7 +453,12 @@ var Select = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
453
453
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onControlMouseDown", function (event) {
|
|
454
454
|
// Event captured by dropdown indicator
|
|
455
455
|
if (event.defaultPrevented) {
|
|
456
|
-
|
|
456
|
+
var _this$controlRef;
|
|
457
|
+
// react-dnd will fire preventDefault in mouseDown, which make select is not clickable.
|
|
458
|
+
// temp workaround to check if select is within dnd, we don't do the early return.
|
|
459
|
+
if (!((_this$controlRef = _this.controlRef) !== null && _this$controlRef !== void 0 && _this$controlRef.closest('[data-rbd-draggable-context-id]'))) {
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
457
462
|
}
|
|
458
463
|
var openMenuOnClick = _this.props.openMenuOnClick;
|
|
459
464
|
if (!_this.state.isFocused) {
|
package/dist/es2019/select.js
CHANGED
|
@@ -419,7 +419,12 @@ export default class Select extends Component {
|
|
|
419
419
|
_defineProperty(this, "onControlMouseDown", event => {
|
|
420
420
|
// Event captured by dropdown indicator
|
|
421
421
|
if (event.defaultPrevented) {
|
|
422
|
-
|
|
422
|
+
var _this$controlRef;
|
|
423
|
+
// react-dnd will fire preventDefault in mouseDown, which make select is not clickable.
|
|
424
|
+
// temp workaround to check if select is within dnd, we don't do the early return.
|
|
425
|
+
if (!((_this$controlRef = this.controlRef) !== null && _this$controlRef !== void 0 && _this$controlRef.closest('[data-rbd-draggable-context-id]'))) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
423
428
|
}
|
|
424
429
|
const {
|
|
425
430
|
openMenuOnClick
|
package/dist/esm/select.js
CHANGED
|
@@ -443,7 +443,12 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
443
443
|
_defineProperty(_assertThisInitialized(_this), "onControlMouseDown", function (event) {
|
|
444
444
|
// Event captured by dropdown indicator
|
|
445
445
|
if (event.defaultPrevented) {
|
|
446
|
-
|
|
446
|
+
var _this$controlRef;
|
|
447
|
+
// react-dnd will fire preventDefault in mouseDown, which make select is not clickable.
|
|
448
|
+
// temp workaround to check if select is within dnd, we don't do the early return.
|
|
449
|
+
if (!((_this$controlRef = _this.controlRef) !== null && _this$controlRef !== void 0 && _this$controlRef.closest('[data-rbd-draggable-context-id]'))) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
447
452
|
}
|
|
448
453
|
var openMenuOnClick = _this.props.openMenuOnClick;
|
|
449
454
|
if (!_this.state.isFocused) {
|