@crispy-seed/data-table 0.11.1 → 0.12.0

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/dist/index.d.ts CHANGED
@@ -285,6 +285,19 @@ interface DataTableColumn<TRow> {
285
285
  onOpenPreview?: (row: TRow) => void;
286
286
  /** `onOpenPreview` 아이콘의 aria-label입니다. @default "Open preview" */
287
287
  openPreviewLabel?: string;
288
+ /**
289
+ * `type: "entity"` only -- makes the entity NAME itself clickable-to-navigate,
290
+ * matching how Attio actually enters a record (measured live: clicking the name
291
+ * text, an `<a href="/…/company/<id>">` sized to the name, not the row). Takes
292
+ * priority over the value's own `href` (`DataTableEntityValue.href`) when both are
293
+ * given. `event.stopPropagation()`'d, so a name click never also fires the row's
294
+ * `onRowClick` -- independent of the `onOpenPreview` button above, which stays a
295
+ * separate affordance for the same row. Renders a plain, non-underlined-until-
296
+ * hover name (crisp's own measured shape: normal name color/weight, an underline
297
+ * affordance on hover, not a blue link) rather than `onOpenPreview`'s icon button.
298
+ * Omit for a plain, non-clickable name (the existing default).
299
+ */
300
+ onOpenRecord?: (row: TRow) => void;
288
301
  /**
289
302
  * 셀 텍스트 옆에 고정으로 붙는 접미(trailing) 아이콘입니다 (예: 링크 열의 외부 링크
290
303
  * 아이콘, 위치 열의 핀 아이콘) -- 텍스트가 길어져도 이 아이콘은 잘리거나 사라지지
@@ -521,6 +534,20 @@ interface DataTableProps<TRow extends {
521
534
  * 됩니다 -- 새 prop 없이 기존 `style` 전달만으로 두 모드 다 지원됩니다.
522
535
  */
523
536
  scrollProps?: Omit<react.ComponentPropsWithoutRef<"div">, "ref" | "onScroll">;
537
+ /**
538
+ * 행 가상화(windowing): 스크롤 컨테이너 뷰포트 근처의 행만 렌더링하고 나머지는 위/아래
539
+ * spacer 행으로 대체해 전체 스크롤 높이를 유지합니다. 수천 행 이상에서 사용하세요.
540
+ * 기본값(`false`)이면 지금까지처럼 모든 행을 렌더링합니다. 켜면 모든 행이 `rowHeight`로
541
+ * 동일한 높이여야 하고, 스크롤이 생기도록 높이 제한(`style={{ maxHeight }}` 등)이
542
+ * 필요합니다. 무한 스크롤(`onLoadMore`)은 sentinel 대신 스크롤 위치로 트리거됩니다.
543
+ * @default false
544
+ */
545
+ virtualized?: boolean;
546
+ /** `virtualized`일 때 한 행의 높이(px)입니다. 레시피의 행 높이(36px)와 일치해야 합니다.
547
+ * @default 36 */
548
+ rowHeight?: number;
549
+ /** `virtualized`일 때 뷰포트 위/아래로 추가 렌더링할 행 수입니다. @default 8 */
550
+ overscan?: number;
524
551
  }
525
552
  /**
526
553
  * @see https://seed-design.io/react/components/data-table