Table

由列模板定义的紧凑数据表格,支持标题和空状态。

可用框架
  • Angular: 可用
  • Vue: 可用
  • React: 可用
  • React Native: 暂不可用

用法

Notes modified in the last 30 days.
Title Folder Last modified Actions
Q4 planning — decisions and ownersProductSep 24
Hiring loop debriefPeopleSep 22
Research synthesis: onboarding interviewsResearchSep 19
Vendor call — licensing termsLegalSep 12

导入

ts
import {
  SoneTableColumnComponent,
  SoneTableComponent,
} from "@surface-one/angular/table";

API 参考

SoneTableColumnComponent组件

选择器
sone-table-column
输入
名称类型 默认值
key必填string—
headerstring""
hideHeaderbooleanfalse
widthstring | nullnull
alignEndbooleanfalse
sort

The header's `aria-sort`; set it on the sorted column only.

"ascending" | "descending" | "none" | nullnull

SoneTableComponent组件

选择器
sone-table
输入
名称类型 默认值
rows必填readonly T[]—
trackBy必填(row: T) => unknown—
rowClass(row: T) => Record<string, boolean>() => ({})
isSelected(row: T) => boolean() => false
captionstring | nullnull
emptyTextstring | nullnull
columns

The columns as data (`{ key, header, cell }`), like the Vue and React twins — an alternative to `<sone-table-column>` children, which win when both are given.

readonly SoneTableColumn<T>[] | nullnull