@jetbrains/ring-ui 4.2.13 → 4.2.15
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.
|
@@ -78,7 +78,7 @@ export default class QueryAssist extends Component {
|
|
|
78
78
|
/**
|
|
79
79
|
* Open suggestions popup during the initial render
|
|
80
80
|
*/
|
|
81
|
-
autoOpen: PropTypes.
|
|
81
|
+
autoOpen: PropTypes.oneOf([true, false, 'force']),
|
|
82
82
|
/**
|
|
83
83
|
* Initial caret position
|
|
84
84
|
*/
|
|
@@ -203,7 +203,7 @@ export default class QueryAssist extends Component {
|
|
|
203
203
|
|
|
204
204
|
this.setupRequestHandler(this.props.delay);
|
|
205
205
|
|
|
206
|
-
if (this.props.autoOpen && query.length > 0) {
|
|
206
|
+
if (this.props.autoOpen === 'force' || this.props.autoOpen && query.length > 0) {
|
|
207
207
|
this.requestHandler().
|
|
208
208
|
catch(noop);
|
|
209
209
|
} else {
|
|
@@ -246,7 +246,7 @@ export default class QueryAssist extends Component {
|
|
|
246
246
|
if (typeof query === 'string' && queryChanged && query !== this.immediateState.query) {
|
|
247
247
|
this.immediateState.query = query;
|
|
248
248
|
|
|
249
|
-
if (
|
|
249
|
+
if (prevProps.autoOpen && query?.length > 0) {
|
|
250
250
|
this.requestData();
|
|
251
251
|
} else if (query) {
|
|
252
252
|
this.requestStyleRanges();
|
|
@@ -373,7 +373,7 @@ export default class QueryAssist extends Component {
|
|
|
373
373
|
|
|
374
374
|
this.immediateState = props;
|
|
375
375
|
this.props.onChange(props);
|
|
376
|
-
if (props.query.length > 0) {
|
|
376
|
+
if (this.props.autoOpen === 'force' || props.query.length > 0) {
|
|
377
377
|
this.requestData();
|
|
378
378
|
}
|
|
379
379
|
};
|
|
@@ -463,7 +463,7 @@ export default class QueryAssist extends Component {
|
|
|
463
463
|
if (!this.props.disabled && (caret !== this.immediateState.caret || popupHidden)) {
|
|
464
464
|
this.immediateState.caret = caret;
|
|
465
465
|
this.scrollInput();
|
|
466
|
-
if (this.immediateState.query.length > 0) {
|
|
466
|
+
if (this.props.autoOpen === 'force' || this.immediateState.query.length > 0) {
|
|
467
467
|
this.requestData();
|
|
468
468
|
}
|
|
469
469
|
}
|
|
@@ -233,7 +233,7 @@ class QueryAssist extends Component {
|
|
|
233
233
|
this.immediateState = props;
|
|
234
234
|
this.props.onChange(props);
|
|
235
235
|
|
|
236
|
-
if (props.query.length > 0) {
|
|
236
|
+
if (this.props.autoOpen === 'force' || props.query.length > 0) {
|
|
237
237
|
this.requestData();
|
|
238
238
|
}
|
|
239
239
|
});
|
|
@@ -314,7 +314,7 @@ class QueryAssist extends Component {
|
|
|
314
314
|
this.immediateState.caret = caret;
|
|
315
315
|
this.scrollInput();
|
|
316
316
|
|
|
317
|
-
if (this.immediateState.query.length > 0) {
|
|
317
|
+
if (this.props.autoOpen === 'force' || this.immediateState.query.length > 0) {
|
|
318
318
|
this.requestData();
|
|
319
319
|
}
|
|
320
320
|
}
|
|
@@ -585,7 +585,7 @@ class QueryAssist extends Component {
|
|
|
585
585
|
};
|
|
586
586
|
this.setupRequestHandler(this.props.delay);
|
|
587
587
|
|
|
588
|
-
if (this.props.autoOpen && query.length > 0) {
|
|
588
|
+
if (this.props.autoOpen === 'force' || this.props.autoOpen && query.length > 0) {
|
|
589
589
|
this.requestHandler().catch(noop);
|
|
590
590
|
} else {
|
|
591
591
|
this.requestStyleRanges().catch(noop);
|
|
@@ -618,7 +618,7 @@ class QueryAssist extends Component {
|
|
|
618
618
|
if (typeof query === 'string' && queryChanged && query !== this.immediateState.query) {
|
|
619
619
|
this.immediateState.query = query;
|
|
620
620
|
|
|
621
|
-
if (
|
|
621
|
+
if (prevProps.autoOpen && (query === null || query === void 0 ? void 0 : query.length) > 0) {
|
|
622
622
|
this.requestData();
|
|
623
623
|
} else if (query) {
|
|
624
624
|
this.requestStyleRanges();
|
|
@@ -972,7 +972,7 @@ _defineProperty(QueryAssist, "propTypes", {
|
|
|
972
972
|
/**
|
|
973
973
|
* Open suggestions popup during the initial render
|
|
974
974
|
*/
|
|
975
|
-
autoOpen: PropTypes.
|
|
975
|
+
autoOpen: PropTypes.oneOf([true, false, 'force']),
|
|
976
976
|
|
|
977
977
|
/**
|
|
978
978
|
* Initial caret position
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.15",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -221,5 +221,5 @@
|
|
|
221
221
|
"node": ">=7.4",
|
|
222
222
|
"npm": ">=6.0.0"
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "c4855e8099f7167c2a4ab2a48844052eaa7dcdf3"
|
|
225
225
|
}
|