superdesk-ui-framework 6.1.4 → 6.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "6.1.4",
3
+ "version": "6.1.6",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -120,6 +120,7 @@ var TreeSelect = /** @class */ (function (_super) {
120
120
  }
121
121
  };
122
122
  _this.onKeyDown = function (e) {
123
+ var _a;
123
124
  if (_this.state.openDropdown && _this.ref.current) {
124
125
  (0, KeyboardNavigation_1.keyboardNavigation)(e, _this.ref.current, _this.categoryButtonRef.current ? _this.buttonFocus : _this.inputFocus);
125
126
  if (e.key === 'Backspace' && _this.state.activeTree.length > 0) {
@@ -132,6 +133,19 @@ var TreeSelect = /** @class */ (function (_super) {
132
133
  }
133
134
  }
134
135
  }
136
+ else if (e.key === 'Delete' &&
137
+ !_this.state.openDropdown &&
138
+ !_this.props.readOnly &&
139
+ !_this.props.disabled &&
140
+ _this.props.clearable !== false &&
141
+ ((_a = _this.treeSelectRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement)) === true) {
142
+ if (e.ctrlKey) {
143
+ _this.setState({ value: [] });
144
+ }
145
+ else if (_this.state.value.length > 0) {
146
+ _this.setState({ value: _this.state.value.slice(0, -1) });
147
+ }
148
+ }
135
149
  };
136
150
  _this.onPressEsc = function (event) {
137
151
  if (event.key === 'Escape' && _this.state.openDropdown) {
@@ -550,4 +550,4 @@
550
550
 
551
551
  import './780.b0b7860a.iframe.bundle.js';
552
552
 
553
- import './main.2713e2b2.iframe.bundle.js';</script></body></html>
553
+ import './main.dda7bbd4.iframe.bundle.js';</script></body></html>