ywana-core8 0.0.902 → 0.0.903

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/dist/index.umd.js CHANGED
@@ -4360,7 +4360,9 @@
4360
4360
  defaultView = _props$defaultView === void 0 ? "grid" : _props$defaultView,
4361
4361
  defaultFolder = props.defaultFolder,
4362
4362
  _props$filterableColu = props.filterableColumns,
4363
- filterableColumns = _props$filterableColu === void 0 ? false : _props$filterableColu;
4363
+ filterableColumns = _props$filterableColu === void 0 ? false : _props$filterableColu,
4364
+ _props$searchBy = props.searchBy,
4365
+ searchBy = _props$searchBy === void 0 ? [] : _props$searchBy;
4364
4366
  var _useState = React.useState(),
4365
4367
  selectedFolder = _useState[0],
4366
4368
  setSelectedFolder = _useState[1];
@@ -4389,7 +4391,11 @@
4389
4391
  setSearch(value);
4390
4392
  }
4391
4393
  var filteredFiles = search ? files.filter(function (file) {
4392
- return file.title.toLowerCase().includes(search.toLowerCase());
4394
+ var serchByValues = searchBy.map(function (key) {
4395
+ return file[key];
4396
+ });
4397
+ var searchByString = serchByValues.join(' ');
4398
+ return searchByString.toLowerCase().includes(search.toLowerCase());
4393
4399
  }) : files;
4394
4400
  var selectedFiles = filteredFiles.filter(function (file) {
4395
4401
  return file.folder === selectedFolder;
@@ -6322,9 +6328,6 @@
6322
6328
 
6323
6329
  /**
6324
6330
  * Content Viewer
6325
- *
6326
- * @param {*} props
6327
- * @returns
6328
6331
  */
6329
6332
  var ContentViewer = function ContentViewer(props) {
6330
6333
  var content = props.content;
@@ -6353,9 +6356,6 @@
6353
6356
 
6354
6357
  /**
6355
6358
  * Field Viewer
6356
- *
6357
- * @param {} props
6358
- * @returns
6359
6359
  */
6360
6360
  var FieldViewer = function FieldViewer(props) {
6361
6361
  var field = props.field,