@juspay/svelte-ui-components 2.96.1 → 2.96.2

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.
@@ -34,12 +34,14 @@
34
34
  column,
35
35
  value,
36
36
  rowIndex,
37
- originalIndex
37
+ originalIndex,
38
+ usePortal = false
38
39
  }: {
39
40
  column: TableColumn;
40
41
  value: TableCellValue;
41
42
  rowIndex: number;
42
43
  originalIndex: number;
44
+ usePortal?: boolean;
43
45
  } = $props();
44
46
 
45
47
  // The td applies column.align as text-align, which flex containers ignore:
@@ -261,6 +263,7 @@
261
263
  disabled={selectData.disabled ?? false}
262
264
  testId={selectData.testId}
263
265
  itemTestId={selectData.itemTestId}
266
+ {usePortal}
264
267
  onchange={(selectedIds) => {
265
268
  if (selectedIds.length > 0) {
266
269
  column.onSelect?.(rowIndex, selectedIds[0], originalIndex);
@@ -389,6 +392,7 @@
389
392
  separator: item.separator
390
393
  }))}
391
394
  testId={column.testId && `${column.testId}-menu-${rowIndex}`}
395
+ {usePortal}
392
396
  onselect={(menuItem) => column.onMenuAction?.(rowIndex, menuItem.value, originalIndex)}
393
397
  >
394
398
  {#snippet trigger()}
@@ -427,6 +431,7 @@
427
431
  separator: item.separator
428
432
  }))}
429
433
  testId={column.testId && `${column.testId}-popup-${rowIndex}`}
434
+ {usePortal}
430
435
  onselect={(menuItem) => column.onMenuAction?.(rowIndex, menuItem.value, originalIndex)}
431
436
  >
432
437
  {#snippet trigger()}
@@ -4,6 +4,7 @@ type $$ComponentProps = {
4
4
  value: TableCellValue;
5
5
  rowIndex: number;
6
6
  originalIndex: number;
7
+ usePortal?: boolean;
7
8
  };
8
9
  declare const BuiltinCell: import("svelte").Component<$$ComponentProps, {}, "">;
9
10
  type BuiltinCell = ReturnType<typeof BuiltinCell>;
@@ -50,7 +50,8 @@
50
50
  rowNumberColumn = false,
51
51
  rowNumberLabel = '#',
52
52
  headerTooltipIcon,
53
- headerTooltipPosition
53
+ headerTooltipPosition,
54
+ usePortal = false
54
55
  }: TableProperties = $props();
55
56
 
56
57
  // ─── Keyed column model → positional projection ─────────────────────────────
@@ -867,6 +868,7 @@
867
868
  value={cellValue}
868
869
  {rowIndex}
869
870
  {originalIndex}
871
+ {usePortal}
870
872
  />
871
873
  {:else if typeof cell === 'function'}
872
874
  {@render cell(cellValue, rowIndex, colIndex)}
@@ -408,6 +408,14 @@ export type OptionalTableProperties = {
408
408
  headerTooltipIcon?: Snippet;
409
409
  /** Placement of every header tooltip bubble. Defaults to `'top'`. */
410
410
  headerTooltipPosition?: TooltipPosition;
411
+ /**
412
+ * When `true`, in-cell `Select` dropdowns (`type: 'select'` columns) and in-cell
413
+ * `Menu` popovers (`type: 'action-group'` / `'popup-menu'` columns) are portaled
414
+ * to `document.body` and positioned `fixed`, so the table's own scroll/overflow
415
+ * container cannot clip them. Set this on tables whose rows can be near a scroll
416
+ * edge. Defaults to `false` (in-flow rendering, unchanged).
417
+ */
418
+ usePortal?: boolean;
411
419
  sortable?: boolean;
412
420
  sortableColumns?: number[];
413
421
  stickyHeader?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.96.1",
3
+ "version": "2.96.2",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",