@wipco/sdui 1.4.0 → 1.4.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.
Files changed (2) hide show
  1. package/dist/index.js +5 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -596,6 +596,10 @@ function resolveViewItems(views, disableGrid, disableList) {
596
596
  }
597
597
  return items.length > 0 ? items : [DEFAULT_VIEWS[0]];
598
598
  }
599
+ function localSearchText(row) {
600
+ const scalar = (v) => typeof v === "string" || typeof v === "number";
601
+ return Object.values(row ?? {}).flatMap((v) => Array.isArray(v) ? v.filter(scalar) : scalar(v) ? [v] : []).join(" ");
602
+ }
599
603
  function SearchResults({
600
604
  item,
601
605
  columns,
@@ -672,12 +676,7 @@ function SearchResults({
672
676
  let rows = item.data;
673
677
  if (hasAllRows) {
674
678
  if (appliedSearch) {
675
- rows = rows.filter(
676
- (row) => includesLooseSearch(
677
- Object.values(row).filter((v) => typeof v === "string" || typeof v === "number").join(" "),
678
- appliedSearch
679
- )
680
- );
679
+ rows = rows.filter((row) => includesLooseSearch(localSearchText(row), appliedSearch));
681
680
  }
682
681
  for (const { key, values } of activeFilters) {
683
682
  rows = rows.filter((row) => values.includes(String(cell(row, key))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipco/sdui",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "WIPCO 서버 주도 UI(SDUI) 렌더러 — JSON 페이지 스펙을 React 컴포넌트로 렌더링",
5
5
  "keywords": [
6
6
  "sdui",