@elastic/eui 106.6.0-backport.0 → 106.6.0-backport.1

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.
@@ -220,6 +220,19 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
220
220
  _defineProperty(_this, "onPlainTextSearch", function (searchValue) {
221
221
  var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
222
222
  var finalQuery = "\"".concat(escapedQueryText, "\"");
223
+ var search = _this.props.search;
224
+ if (isEuiSearchBarProps(search)) {
225
+ if (search.onChange) {
226
+ var shouldQueryInMemory = search.onChange({
227
+ query: EuiSearchBar.Query.parse(finalQuery),
228
+ queryText: escapedQueryText,
229
+ error: null
230
+ });
231
+ if (!shouldQueryInMemory) {
232
+ return;
233
+ }
234
+ }
235
+ }
223
236
  _this.setState({
224
237
  query: EuiSearchBar.Query.parse(finalQuery)
225
238
  });
@@ -227,6 +227,19 @@ var EuiInMemoryTable = exports.EuiInMemoryTable = /*#__PURE__*/function (_Compon
227
227
  _defineProperty(_this, "onPlainTextSearch", function (searchValue) {
228
228
  var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
229
229
  var finalQuery = "\"".concat(escapedQueryText, "\"");
230
+ var search = _this.props.search;
231
+ if (isEuiSearchBarProps(search)) {
232
+ if (search.onChange) {
233
+ var shouldQueryInMemory = search.onChange({
234
+ query: _search_bar.EuiSearchBar.Query.parse(finalQuery),
235
+ queryText: escapedQueryText,
236
+ error: null
237
+ });
238
+ if (!shouldQueryInMemory) {
239
+ return;
240
+ }
241
+ }
242
+ }
230
243
  _this.setState({
231
244
  query: _search_bar.EuiSearchBar.Query.parse(finalQuery)
232
245
  });
@@ -212,6 +212,19 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
212
212
  _defineProperty(_this, "onPlainTextSearch", function (searchValue) {
213
213
  var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
214
214
  var finalQuery = "\"".concat(escapedQueryText, "\"");
215
+ var search = _this.props.search;
216
+ if (isEuiSearchBarProps(search)) {
217
+ if (search.onChange) {
218
+ var shouldQueryInMemory = search.onChange({
219
+ query: EuiSearchBar.Query.parse(finalQuery),
220
+ queryText: escapedQueryText,
221
+ error: null
222
+ });
223
+ if (!shouldQueryInMemory) {
224
+ return;
225
+ }
226
+ }
227
+ }
215
228
  _this.setState({
216
229
  query: EuiSearchBar.Query.parse(finalQuery)
217
230
  });
@@ -220,6 +220,19 @@ var EuiInMemoryTable = exports.EuiInMemoryTable = /*#__PURE__*/function (_Compon
220
220
  (0, _defineProperty2.default)(_this, "onPlainTextSearch", function (searchValue) {
221
221
  var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
222
222
  var finalQuery = "\"".concat(escapedQueryText, "\"");
223
+ var search = _this.props.search;
224
+ if (isEuiSearchBarProps(search)) {
225
+ if (search.onChange) {
226
+ var shouldQueryInMemory = search.onChange({
227
+ query: _search_bar.EuiSearchBar.Query.parse(finalQuery),
228
+ queryText: escapedQueryText,
229
+ error: null
230
+ });
231
+ if (!shouldQueryInMemory) {
232
+ return;
233
+ }
234
+ }
235
+ }
223
236
  _this.setState({
224
237
  query: _search_bar.EuiSearchBar.Query.parse(finalQuery)
225
238
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "106.6.0-backport.0",
4
+ "version": "106.6.0-backport.1",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -221,6 +221,19 @@ var EuiInMemoryTable = exports.EuiInMemoryTable = /*#__PURE__*/function (_Compon
221
221
  (0, _defineProperty2.default)(_this, "onPlainTextSearch", function (searchValue) {
222
222
  var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
223
223
  var finalQuery = "\"".concat(escapedQueryText, "\"");
224
+ var search = _this.props.search;
225
+ if (isEuiSearchBarProps(search)) {
226
+ if (search.onChange) {
227
+ var shouldQueryInMemory = search.onChange({
228
+ query: _search_bar.EuiSearchBar.Query.parse(finalQuery),
229
+ queryText: escapedQueryText,
230
+ error: null
231
+ });
232
+ if (!shouldQueryInMemory) {
233
+ return;
234
+ }
235
+ }
236
+ }
224
237
  _this.setState({
225
238
  query: _search_bar.EuiSearchBar.Query.parse(finalQuery)
226
239
  });