next-helios-fe 1.1.15 → 1.1.17

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": "next-helios-fe",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,6 +32,9 @@ interface TableProps {
32
32
  export?: {
33
33
  show?: boolean;
34
34
  };
35
+ columnSearch?: {
36
+ show?: boolean;
37
+ };
35
38
  pagination?: {
36
39
  show?: boolean;
37
40
  };
@@ -179,30 +182,32 @@ export const Table: TableComponentProps = ({
179
182
  }`}
180
183
  />
181
184
  </button>
182
- <div className="relative flex items-center">
183
- <input
184
- type="search"
185
- className="w-full ps-6 pe-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
186
- placeholder="search.."
187
- value={
188
- filter.find((filterItem) => filterItem.key === item.key)
189
- ?.value
190
- }
191
- onChange={(e) => {
192
- setFilter(
193
- filter.map((filterItem) => {
194
- return filterItem.key === item.key
195
- ? { ...filterItem, value: e.target.value }
196
- : filterItem;
197
- })
198
- );
199
- }}
200
- />
201
- <Icon
202
- icon="ic:round-search"
203
- className="absolute text-sm text-slate-400"
204
- />
205
- </div>
185
+ {options?.toolbar?.columnSearch?.show !== false && (
186
+ <div className="relative flex items-center">
187
+ <input
188
+ type="search"
189
+ className="w-full ps-6 pe-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
190
+ placeholder="search.."
191
+ value={
192
+ filter.find((filterItem) => filterItem.key === item.key)
193
+ ?.value
194
+ }
195
+ onChange={(e) => {
196
+ setFilter(
197
+ filter.map((filterItem) => {
198
+ return filterItem.key === item.key
199
+ ? { ...filterItem, value: e.target.value }
200
+ : filterItem;
201
+ })
202
+ );
203
+ }}
204
+ />
205
+ <Icon
206
+ icon="ic:round-search"
207
+ className="absolute text-sm text-slate-400"
208
+ />
209
+ </div>
210
+ )}
206
211
  </div>
207
212
  </th>
208
213
  );
@@ -397,12 +402,14 @@ export const Table: TableComponentProps = ({
397
402
  <th className="sticky left-0 w-min px-4 py-2 z-10 bg-secondary-bg font-medium text-center whitespace-nowrap">
398
403
  <div className="flex flex-col">
399
404
  <span>NO.</span>
400
- <div className="invisible w-0 overflow-hidden">
401
- <input
402
- type="search"
403
- className="w-full px-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
404
- />
405
- </div>
405
+ {options?.toolbar?.columnSearch?.show !== false && (
406
+ <div className="invisible w-0 overflow-hidden">
407
+ <input
408
+ type="search"
409
+ className="w-full px-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
410
+ />
411
+ </div>
412
+ )}
406
413
  </div>
407
414
  </th>
408
415
  )}
@@ -411,12 +418,14 @@ export const Table: TableComponentProps = ({
411
418
  <th className="w-min px-4 py-2 bg-secondary-bg font-medium text-center">
412
419
  <div className="flex flex-col">
413
420
  <span>Actions</span>
414
- <div className="invisible w-0 overflow-hidden">
415
- <input
416
- type="search"
417
- className="w-full px-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
418
- />
419
- </div>
421
+ {options?.toolbar?.columnSearch?.show !== false && (
422
+ <div className="invisible w-0 overflow-hidden">
423
+ <input
424
+ type="search"
425
+ className="w-full px-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
426
+ />
427
+ </div>
428
+ )}
420
429
  </div>
421
430
  </th>
422
431
  )}