next-helios-fe 1.8.29 → 1.8.31

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.8.29",
3
+ "version": "1.8.31",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,7 +6,7 @@ import { Icon } from "@iconify/react";
6
6
  export interface MultipleSelectProps
7
7
  extends Omit<
8
8
  React.HTMLAttributes<HTMLDivElement>,
9
- "defaultvalue" | "value" | "onChange"
9
+ "defaultvalue" | "value" | "onChange" | "onSelect"
10
10
  > {
11
11
  menus: {
12
12
  label: string;
@@ -29,6 +29,8 @@ export interface MultipleSelectProps
29
29
  value: string[];
30
30
  };
31
31
  }) => void;
32
+ onSelect?: (menu: string) => void;
33
+ onRemove?: (menu: string) => void;
32
34
  }
33
35
 
34
36
  export const MultipleSelect: React.FC<MultipleSelectProps> = ({
@@ -42,6 +44,8 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
42
44
  value,
43
45
  onClick,
44
46
  onChange,
47
+ onSelect,
48
+ onRemove,
45
49
  ...rest
46
50
  }) => {
47
51
  const [tempValue, setTempValue] = useState<string[]>([]);
@@ -201,6 +205,9 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
201
205
  },
202
206
  } as any);
203
207
  }
208
+ if (onRemove) {
209
+ onRemove(item);
210
+ }
204
211
  }
205
212
  }}
206
213
  >
@@ -254,6 +261,9 @@ export const MultipleSelect: React.FC<MultipleSelectProps> = ({
254
261
  target: { value: [...tempValue, item.value] },
255
262
  } as any);
256
263
  }
264
+ if (onSelect) {
265
+ onSelect(item.value);
266
+ }
257
267
  }}
258
268
  >
259
269
  {item.label}
@@ -456,7 +456,8 @@ export const Table: TableComponentProps = ({
456
456
  return (
457
457
  <td
458
458
  key={headerItem.key}
459
- className="px-4 py-1.5 bg-secondary-bg whitespace-nowrap"
459
+ className="max-w-60 px-4 py-1.5 bg-secondary-bg truncate whitespace-nowrap"
460
+ title={item[headerItem.key as keyof typeof item] || "-"}
460
461
  >
461
462
  {item[headerItem.key as keyof typeof item] || "-"}
462
463
  </td>