next-helios-fe 1.1.15 → 1.1.16

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.16",
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
  );