الفتحات

في DataTable عدد 24 من الفتحات. مرّر بديلًا لأي منها في components، وكل فتحة لا تمرّرها تبقى على بديلها الافتراضي. فتحات العناصر تستقبل خصائص DOM فيناسبها عنصر المكتبة كما هو، وفتحات الأدوات تستقبل خصائص مسمّاة وتحتاج عادة إلى بضعة أسطر من المحوّل.

الاسمالنوعالخصائص التي تستقبلهاالبديل الافتراضيسمات data-*
Root<element>

خصائص DOM: HTMLAttributes<HTMLDivElement>

مصدر البديل
const Root = ({ className, ...props }: RootSlotProps) => (
  <div className={cx("sdt", className)} {...props} />
);
  • data-size
  • data-status
  • data-striped
  • data-virtual
Table<element>

خصائص DOM: TableHTMLAttributes<HTMLTableElement>

مصدر البديل
const Table = ({ className, ...props }: TableSlotProps) => (
  <table className={cx("sdt__table", className)} {...props} />
);
  • data-spreadsheet
Head<element>

خصائص DOM: HTMLAttributes<HTMLTableSectionElement>

مصدر البديل
const Head = ({ className, ...props }: SectionSlotProps) => (
  <thead className={cx("sdt__head", className)} {...props} />
);
—
Body<element>

خصائص DOM: HTMLAttributes<HTMLTableSectionElement>

مصدر البديل
const Body = ({ className, ...props }: SectionSlotProps) => (
  <tbody className={cx("sdt__body", className)} {...props} />
);
  • data-reorder-table
HeaderRow<element>

خصائص DOM: HTMLAttributes<HTMLTableRowElement>

مصدر البديل
const HeaderRow = ({ className, ...props }: RowSlotProps) => (
  <tr className={cx("sdt__row", className)} {...props} />
);
  • data-clickable
  • data-depth
  • data-expanded
HeaderCell<element>

خصائص DOM: Omit<ThHTMLAttributes<HTMLTableCellElement>, "align">

مصدر البديل
const HeaderCell = ({ className, ...props }: HeaderCellSlotProps) => (
  <th className={cx("sdt__cell", className)} {...props} />
);
  • data-align
  • data-slot
  • data-sorted
Foot<element>

خصائص DOM: HTMLAttributes<HTMLTableSectionElement>

مصدر البديل
const Foot = ({ className, ...props }: SectionSlotProps) => (
  <tfoot className={cx("sdt__foot", className)} {...props} />
);
—
FooterRow<element>

خصائص DOM: HTMLAttributes<HTMLTableRowElement>

مصدر البديل
const FooterRow = ({ className, ...props }: RowSlotProps) => (
  <tr className={cx("sdt__row", className)} {...props} />
);
  • data-clickable
  • data-depth
  • data-expanded
FooterCell<element>

خصائص DOM: Omit<TdHTMLAttributes<HTMLTableCellElement>, "align">

مصدر البديل
const FooterCell = ({ className, ...props }: CellSlotProps) => (
  <td className={cx("sdt__cell", className)} {...props} />
);
  • data-align
Row<element>

خصائص DOM: HTMLAttributes<HTMLTableRowElement>

مصدر البديل
const Row = ({ className, ...props }: RowSlotProps) => (
  <tr className={cx("sdt__row", className)} {...props} />
);
  • data-clickable
  • data-depth
  • data-dragging
  • data-dragging-child
  • data-drop-edge
  • data-drop-position
  • data-expanded
  • data-row-id
  • data-state
Cell<element>

خصائص DOM: Omit<TdHTMLAttributes<HTMLTableCellElement>, "align">

مصدر البديل
const Cell = ({ className, ...props }: CellSlotProps) => (
  <td className={cx("sdt__cell", className)} {...props} />
);
  • data-active
  • data-align
  • data-column-id
  • data-copied
  • data-editable
  • data-editing
  • data-fill-preview
  • data-range-edge
  • data-selected
  • data-slot
Checkbox{widget}
  • checked: boolean

    Whether the row (or every row on the page) is selected.

  • indeterminate: boolean

    Some, but not all, rows (or sub-rows) are selected.

  • disabled: boolean

    The row can't be selected.

  • onCheckedChange: (checked: boolean) => void

    Call with the new checked value.

  • aria-label: string

    Accessible name, from labels.selectRow / labels.selectAll, or a checkbox column's header in spreadsheet mode.

  • tabIndex?: number

    -1 in a spreadsheet cell, where the cell holds the focus and Space toggles the box: put it on the control so Tab skips it.

مصدر البديل
const Checkbox = ({ checked, indeterminate, disabled, onCheckedChange, ...aria }: CheckboxSlotProps) => {
  const ref = useRef<HTMLInputElement>(null);
  useEffect(() => {
    if (ref.current) ref.current.indeterminate = indeterminate;
  }, [indeterminate]);

  return (
    <input
      ref={ref}
      type="checkbox"
      className="sdt__checkbox"
      checked={checked}
      disabled={disabled}
      onChange={(event) => onCheckedChange(event.target.checked)}
      onClick={(event) => event.stopPropagation()}
      {...aria}
    />
  );
};
—
SortTrigger{widget}
  • direction: SortDirection

    The column's current sort direction.

  • onClick: (event: MouseEvent<HTMLElement>) => void

    Toggles the sort (asc → desc → none). Pass the event so shift-click multi-sorts.

  • children: ReactNode

    The rendered header.

مصدر البديل
const SortTrigger = ({ direction, onClick, children }: SortTriggerSlotProps) => {
  const { components } = useDataTableContext();
  return (
    <button type="button" className="sdt__sort" data-sorted={direction || undefined} onClick={onClick}>
      {children}
      <span className="sdt__sort-icon">
        <components.SortIcon direction={direction} />
      </span>
    </button>
  );
};
—
SortIcon{widget}
  • direction: SortDirection

    The column's current sort direction.

مصدر البديل
const SortIcon = ({ direction }: SortIconSlotProps) =>
direction === "asc" ? <ArrowUpIcon /> : direction === "desc" ? <ArrowDownIcon /> : <ArrowUpDownIcon />;
—
ExpandToggle{widget}
  • expanded: boolean

    Whether the row is expanded.

  • depth: number

    The row's nesting depth; 0 for top-level rows.

  • onToggle: () => void

    Expands or collapses the row.

  • aria-label: string

    Accessible name, from labels.expandRow / labels.collapseRow.

مصدر البديل
const ExpandToggle = ({ expanded, onToggle, depth: _depth, ...aria }: ExpandToggleSlotProps) => (
  <button
    type="button"
    className="sdt__expand"
    aria-expanded={expanded}
    data-expanded={expanded || undefined}
    onClick={(event) => {
      event.stopPropagation();
      onToggle();
    }}
    {...aria}
  >
    <ChevronIcon direction="next" />
  </button>
);
  • data-expanded
Skeleton{widget}
  • rowIndex: number

    Index of the skeleton row.

  • columnIndex: number

    Index of the cell within the row, counting the checkbox column.

مصدر البديل
const Skeleton = (_: SkeletonSlotProps) => <div className="sdt__skeleton" />;
—
Empty{widget}
  • message: ReactNode

    From labels.empty.

مصدر البديل
const Empty = ({ message }: EmptySlotProps) => <div className="sdt__message">{message}</div>;
—
Error{widget}
  • error: unknown

    The error value, as passed.

  • message: ReactNode

    From labels.error.

  • retryLabel: ReactNode

    From labels.retry.

  • onRetry?: () => void

    The onRetry option; show a retry button when present.

مصدر البديل
const ErrorState = ({ message, retryLabel, onRetry }: ErrorSlotProps) => (
  <div className="sdt__error" role="alert">
    <span>{message}</span>
    {onRetry && (
      <button type="button" className="sdt__button" onClick={onRetry}>
        {retryLabel}
      </button>
    )}
  </div>
);
—
Pagination{widget}
  • pageIndex: number

    Zero-based current page.

  • pageCount: number

    Total pages; at least 1, even with no rows.

  • pageSize: number

    Rows per page.

  • pageSizeOptions: number[]

    The page sizes offered, including the current one.

  • rowCount: number

    Total rows across all pages.

  • canPreviousPage: boolean

    Whether there's a previous page.

  • canNextPage: boolean

    Whether there's a next page.

  • previousPage: () => void

    Goes to the previous page.

  • nextPage: () => void

    Goes to the next page.

  • setPageIndex: (pageIndex: number) => void

    Goes to a zero-based page.

  • setPageSize: (pageSize: number) => void

    Changes the page size.

  • labels: DataTableLabels

    The resolved labels.

مصدر البديل
const Pagination = (props: PaginationSlotProps) => {
  const { components } = useDataTableContext();
  const { labels } = props;
  return (
    <nav className="sdt__pagination" aria-label={labels.pagination}>
      <div className="sdt__pagination-buttons">
        <components.PaginationButton
          direction="previous"
          disabled={!props.canPreviousPage}
          onClick={props.previousPage}
          aria-label={labels.previousPage}
        />
        <components.PaginationButton
          direction="next"
          disabled={!props.canNextPage}
          onClick={props.nextPage}
          aria-label={labels.nextPage}
        />
      </div>
      <span className="sdt__pagination-info" aria-live="polite">
        {labels.pageInfo(props.pageIndex + 1, props.pageCount)}
      </span>
      <components.PageSizeSelect
        value={props.pageSize}
        options={props.pageSizeOptions}
        onValueChange={props.setPageSize}
        label={labels.rowsPerPage}
      />
    </nav>
  );
};
—
PaginationButton{widget}
  • direction: "previous" | "next"

    Which way the button goes.

  • disabled: boolean

    There's no page in that direction.

  • onClick: () => void

    Goes to that page.

  • aria-label: string

    Accessible name, from labels.previousPage / labels.nextPage.

مصدر البديل
const PaginationButton = ({ direction, ...props }: PaginationButtonSlotProps) => (
  <button type="button" className="sdt__button sdt__button--icon" {...props}>
    <ChevronIcon direction={direction} />
  </button>
);
—
PageSizeSelect{widget}
  • value: number

    The current page size.

  • options: number[]

    The page sizes offered.

  • onValueChange: (pageSize: number) => void

    Call with the chosen page size.

  • label: ReactNode

    From labels.rowsPerPage.

مصدر البديل
const PageSizeSelect = ({ value, options, onValueChange, label }: PageSizeSelectSlotProps) => {
  const id = useId();
  const { locale } = useDataTableContext();
  const { code } = useLocaleSection("table", locale);
  const root = useRef<HTMLDivElement>(null);
  const items = useMemo(() => {
    const number = code === undefined ? String : createNumber(code);
    return options.map((option) => ({ value: option, label: number(option) }));
  }, [options, code]);
  return (
    <div className="sdt__page-size" ref={root}>
      <span id={id} onClick={() => root.current?.querySelector<HTMLElement>("[role=combobox]")?.focus()}>
        {label}
      </span>
      <Autocomplete
        className="sdt__page-size-select"
        aria-labelledby={id}
        options={items}
        value={value}
        onChange={(next: OptionValue | null) => {
          if (next !== null) onValueChange(Number(next));
        }}
        searchable={false}
        clearable={false}
        matchTriggerWidth={false}
        locale={locale}
      />
    </div>
  );
};
—
DragHandle<element>

خصائص DOM: Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color">

  • ref?: Ref<HTMLButtonElement>
  • data-dragging?: ""
مصدر البديل
const DragHandle = ({ className, ...props }: DragHandleSlotProps) => (
  <button type="button" className={cx("sdt__drag", className)} {...props}>
    <GripIcon />
  </button>
);
  • data-dragging
CellEditor{widget}لا خصائص خاصة بها.
مصدر البديل
const CellEditor = (props: CellEditorSlotProps) => {
  const { locale, spreadsheet } = useDataTableContext();
  const errorId = useId();
  const invalid = props.error !== null;
  const message = invalid ? (
    <span id={errorId} role="alert" className="sdt__editor-error" style={ERROR_LAYOUT}>
      {props.error}
    </span>
  ) : null;
  const described = invalid ? errorId : undefined;

  if (props.kind === "select") {
    const { options, onCommit } = props;
    const items = options.map((label, index) => ({ value: index, label }));
    const index = options.indexOf(props.value);
    return (
      <div className="sdt__editor" style={EDITOR_LAYOUT}>
        <Autocomplete
          className="sdt__editor-control"
          slotProps={{ trigger: { className: "sdt__editor-trigger" } }}
          options={items}
          value={index >= 0 ? index : null}
          onChange={(next: OptionValue | null) => {
            if (next !== null) onCommit(options[Number(next)]);
          }}
          defaultOpen
          // Opened by typing over the cell, the typed text searches; otherwise it is a plain list.
          searchable={props.search !== ""}
          searchIn={props.search !== "" ? "trigger" : undefined}
          defaultSearchQuery={props.search || undefined}
          clearable={false}
          matchTriggerWidth={false}
          invalid={invalid}
          aria-label={props["aria-label"]}
          aria-describedby={described}
          locale={locale}
        />
        {message}
      </div>
    );
  }

  if (props.kind === "date") {
    const { onCommit, onValueChange } = props;
    // The slotsmith DatePicker when the app passed it (`spreadsheet.datePicker`), else the browser's own.
    const Picker = spreadsheet.datePicker;
    return (
      <div className="sdt__editor" style={EDITOR_LAYOUT}>
        {Picker ? (
          <Picker
            className="sdt__editor-control"
            slotProps={{ trigger: { className: "sdt__editor-trigger" } }}
            mode="single"
            trigger="button"
            valueFormat="YYYY-MM-DD"
            value={props.value === "" ? null : props.value}
            onChange={(date) => onCommit(date ?? "")}
            defaultOpen
            invalid={invalid}
            aria-label={props["aria-label"]}
            aria-describedby={described}
            locale={locale}
          />
        ) : (
          <input
            type="date"
            className="sdt__editor-input"
            value={props.value}
            onChange={(event) => onValueChange(event.target.value)}
            aria-label={props["aria-label"]}
            aria-invalid={invalid || undefined}
            aria-describedby={described}
          />
        )}
        {message}
      </div>
    );
  }

  const { onValueChange } = props;
  return (
    <div className="sdt__editor" style={EDITOR_LAYOUT}>
      <input
        className="sdt__editor-input"
        value={props.value}
        onChange={(event) => onValueChange(event.target.value)}
        inputMode={props.kind === "number" ? "decimal" : undefined}
        autoComplete="off"
        spellCheck={false}
        aria-label={props["aria-label"]}
        aria-invalid={invalid || undefined}
        aria-describedby={described}
      />
      {message}
    </div>
  );
};
—
FillHandle<element>

خصائص DOM: HTMLAttributes<HTMLSpanElement>

  • data-fill-handle: ""
  • aria-hidden: true
مصدر البديل
const FillHandle = ({ className, ...props }: FillHandleSlotProps) => (
  <span className={cx("sdt__fill-handle", className)} {...props} />
);
  • data-fill-handle

الخصائص

كل خصائص DataTable مجمّعة كما في توثيق المكتبة. الحالة المتحكَّم بها تأتي أزواجًا: مرّر القيمة مع معالج تغييرها، أو القيمة الابتدائية وحدها لتبقى الحالة داخل المكوّن.

الاسمالنوعالافتراضيالوصف
Data
dataT[]—

The rows to display. For manual pagination, just the current page. Pass this or value.

valueT[]—

The rows, for a table people edit: the same as data, named like any other controlled value. Wins over data.

columnsمطلوبةDataTableColumnDef<T>[]—

The column definitions.

getRowId(row: T, index: number, parent?: DataTableRow<T>) => string

row.id, falling back to the row's index path

Stable row identity. Defaults to row.id, falling back to the row's index path.

Sorting
sortingSortingState—

Controlled sorting state.

onSortingChange(sorting: SortingState) => void—

Called with the new sorting state.

defaultSortingSortingState[]

Initial sorting when uncontrolled. Defaults to [].

manualSortingbooleanfalse

The data arrives already sorted (server-side sorting). Defaults to false.

enableMultiSortbooleanfalse

Allow sorting by several columns with shift-click. Defaults to false.

Pagination
paginationPaginationState—

Controlled pagination state.

onPaginationChange(pagination: PaginationState) => void—

Called with the new pagination state.

defaultPaginationPaginationState{ pageIndex: 0, pageSize: 10 }

Initial pagination when uncontrolled. Defaults to { pageIndex: 0, pageSize: 10 }.

manualPaginationbooleanfalse

The data is already one page (server-side pagination); pass rowCount too. Defaults to false.

rowCountnumber—

Total rows across all pages, for manual pagination.

pageSizeOptionsnumber[]DEFAULT_PAGE_SIZE_OPTIONS

The page sizes offered. Defaults to DEFAULT_PAGE_SIZE_OPTIONS.

enablePaginationbooleantrue

false renders every row and hides the pagination. Defaults to true.

hidePaginationboolean—

Hide the pagination UI while still paginating.

Selection
enableRowSelectionboolean | ((row: DataTableRow<T>) => boolean)—

Shows a checkbox column. A function decides per row whether it can be selected.

selectionT[]—

Controlled selection, as row objects. Matched to rows by getRowId.

onSelectionChange(selection: T[]) => void—

Called with the selected rows, including rows on other server pages.

defaultSelectionT[][]

Initial selection when uncontrolled. Defaults to [].

resetSelectionOnPageChangebooleanfalse

Clear the selection whenever the page or page size changes. Defaults to false.

Tree rows
getSubRows(row: T, index: number) => readonly T[] | undefined—

Returns a row's children, turning the table into a tree.

setSubRows(row: T, subRows: T[]) => T—

Writes new children into a copy of a tree row and returns it: how the table builds the new tree after a move across parents (reorderAcrossParents) or an edit of a sub-row in spreadsheet mode.

getRowCanExpand(row: DataTableRow<T>) => boolean—

Decides whether a row can expand, e.g. to lazy-load children.

expandedExpandedState—

Controlled expansion: true for all rows, or { [rowId]: true }.

onExpandedChange(expanded: ExpandedState) => void—

Called with the new expansion state.

defaultExpandedExpandedState{}

Initial expansion when uncontrolled. Defaults to {}.

paginateExpandedRowsbooleanfalse

Count sub-rows towards the page size. Defaults to false.

Row reordering
enableRowReorderbooleanfalse

Lets rows be dragged into a new order, by pointer, touch or keyboard. In a tree table (getSubRows) a row moves among its siblings only, with its sub-rows. Ignored, with a development warning, in VirtualDataTable. Defaults to false.

onRowOrderChange(change: RowOrderChange<T>) => void—

Called when a row is dropped in a new place. The table does not reorder itself: store change.data, or for a sub-row, change.siblings as the children of change.parent.

reorderHandleColumnbooleantrue

Adds a leading column with each row's drag handle. false lets you place DataTable.DragHandle yourself. Defaults to true.

reorderWhileSortedReorderWhileSorted"clearSort"

What a drop means while a column sort is active. "clearSort": the drop reorders the data and the sort is cleared (through onSortingChange), so the new order shows. "block": the handles are disabled until the sort is cleared. Defaults to "clearSort".

reorderAcrossParentsbooleanfalse

In a tree table, rows may be dragged to another parent and another depth, not only among their siblings: drag sideways (or press the left and right arrow keys while a row is lifted) to move it in or out a level. Needs getSubRows and setSubRows; a drop then reports the whole new tree as change.data. Defaults to false.

canDrop(move: RowMove<T>) => boolean—

Whether a dragged row may land at a place; places it may not are skipped while dragging.

reorderGroupstring—

Tables with the same reorderGroup exchange rows: a top-level row (or a selected group of them) dragged out of one table can be dropped into another, by pointer, or from the keyboard past the first or last row. Each table needs enableRowReorder.

reorderTableIdstring

a generated id

This table's name in transfers between the tables of a reorder group. Defaults to a generated id.

onRowTransfer(transfer: RowTransfer<T>) => void—

Called on both tables when rows move between them: transfer.data is this table's new rows (without the rows in the table they left, with them in the one they joined). Store it, as with onRowOrderChange.

Spreadsheet
spreadsheetboolean | DataTableSpreadsheetOptions<T>false

Spreadsheet mode: cells are selected, navigated and edited with the keyboard and the pointer, copied and pasted as tab-separated text, filled with the fill handle and undone. Columns opt in to editing with edit. Defaults to false.

onValueChange(value: T[], change: DataTableValueChange<T>) => void—

Called with the new rows after every edit in spreadsheet mode: typing, paste, cut, Delete, fill, undo and redo. The table never changes the rows itself, so store value and pass it back. Only the rows that changed are new objects, so only they re-render.

Status
loadingbooleanfalse

Shows skeleton rows. Defaults to false.

errorunknown—

Any non-nullish value shows the error state.

onRetry() => void—

Shows a retry button in the error state.

Rendering
componentsPartial<DataTableComponents>—

Replace any UI slot; the rest fall back to SlotsmithProvider's components.dataTable, then to the built-in plain-HTML ones.

labelsPartial<DataTableLabels>—

Override any text, e.g. to translate the table. Wins over locale.

localeLocaleInput

the provider's

The language: a locale object, or the tag of one given to SlotsmithProvider. Defaults to the provider's.

slotPropsDataTableSlotProps<T>—

Extra DOM props for element slots, e.g. per-row classNames.

onRowClickDataTableContextValue<T>["onRowClick"]—

Called when a body row is clicked (not its checkbox or expand toggle).

size"sm" | "default"—

Density; sets data-size.

stripedboolean—

Alternate row backgrounds; sets data-striped.

tableOptionsPartial<TableOptions<DataTableFeatures, T>>—

Escape hatch: extra options passed straight to TanStack's useTable.

virtualDataTableVirtualOptions—

Renders only the rows in view, for long lists: pass the virtualizer hook (useVirtualizer from @tanstack/react-virtual) as use, and the sizes. The header stays sticky, and pagination is off unless enablePagination turns it back on. Every other feature keeps working, row reordering and spreadsheet mode included.

تُمرَّر أي خاصية أخرى إلى العنصر الجذر <div>.

النصوص واللغات

كل نص يعرضه DataTable أو يعلنه، مع قيمته الافتراضية بالإنجليزية. مرّر labels لتغيير بعضها في مكوّن واحد، أو locale لتحويل كل النصوص إلى لغة أخرى. العرض أدناه يفعل الأمرين.

المفتاحالنوعالافتراضي بالإنجليزيةالوصف
emptyReactNode"No data found"

Empty state message. Default: "No data found".

errorReactNode"Something went wrong while loading the data."

Error state message.

retryReactNode"Retry"

Retry button text. Default: "Retry".

rowsPerPageReactNode"Rows per page"

Page-size select label. Default: "Rows per page".

pageInfo(page: number, pageCount: number) => ReactNodepageInfo(3, 12)

يطبع "Page 3 of 12"

Page info. Default: Page ${page} of ${pageCount}.

paginationstring"Pagination"

Accessible name of the pagination landmark.

previousPagestring"Previous page"

Accessible name of the previous-page button.

nextPagestring"Next page"

Accessible name of the next-page button.

selectAllstring"Select all rows on this page"

Accessible name of the select-all checkbox.

selectRowstring"Select row"

Accessible name of each row checkbox.

expandRowstring"Expand row"

Accessible name of the expand toggle on a collapsed row.

collapseRowstring"Collapse row"

Accessible name of the expand toggle on an expanded row.

reorderRowstring"Reorder row"

Accessible name of each row's drag handle. Default: "Reorder row".

reorderInstructionsstring"Press space to lift the row, the arrow keys to move it, space to drop it, escape to cancel."

How to move a row with the keyboard, given to assistive technology with the drag handle.

reorderLifted(position: number, total: number) => stringreorderLifted(3, 12)

يطبع "Row lifted. Position 3 of 12."

Announced when a row is lifted. Default: Row lifted. Position ${position} of ${total}.

reorderMoved(position: number, total: number) => stringreorderMoved(3, 12)

يطبع "Position 3 of 12."

Announced on each keyboard step. Default: Position ${position} of ${total}.

reorderDropped(position: number, total: number) => stringreorderDropped(3, 12)

يطبع "Row dropped at position 3 of 12."

Announced when a row is dropped. Default: Row dropped at position ${position} of ${total}.

reorderCancelledstring"Reordering cancelled."

Announced when a move is cancelled. Default: "Reordering cancelled."

reorderLevel(level: number) => stringreorderLevel(3)

يطبع "Level 3."

Announced after a step or a drop that moves a row across parents, with its depth from 1. Default: Level ${level}.

editCell(column: string) => stringeditCell("…")

يطبع "Edit …"

Spreadsheet mode: the cell editor's accessible name. Default: Edit ${column}.

invalidNumberstring"Enter a number."

Spreadsheet mode: a number cell got text that is not a number. Default: "Enter a number."

invalidOptionstring"Choose one of the options."

Spreadsheet mode: a select cell got text that matches no option. Default: "Choose one of the options."

invalidDatestring"Enter a valid date."

Spreadsheet mode: a date cell got text that is not a date. Default: "Enter a valid date."

invalidBooleanstring"Enter TRUE or FALSE."

Spreadsheet mode: a checkbox cell got text that is neither true nor false. Default: "Enter TRUE or FALSE."

cellsCopied(count: number) => stringcellsCopied(3)

يطبع "3 cells copied."

Spreadsheet mode: announced after a copy. Default: ${count} cells copied.

cellsCut(count: number) => stringcellsCut(3)

يطبع "3 cells cut."

Spreadsheet mode: announced after a cut. Default: ${count} cells cut.

cellsPasted(count: number, skipped: number) => stringcellsPasted(3, 12)

يطبع "3 cells pasted, 12 skipped."

Spreadsheet mode: announced after a paste; skipped cells did not fit their column.

cellsCleared(count: number) => stringcellsCleared(3)

يطبع "3 cells cleared."

Spreadsheet mode: announced after Delete. Default: ${count} cells cleared.

cellsFilled(count: number) => stringcellsFilled(3)

يطبع "3 cells filled."

Spreadsheet mode: announced after a fill. Default: ${count} cells filled.

undonestring"Undone."

Spreadsheet mode: announced after an undo. Default: "Undone."

redonestring"Redone."

Spreadsheet mode: announced after a redo. Default: "Redone."

Der ProcessFranz Kafka1925
Effi BriestTheodor Fontane1896
Der SteppenwolfHermann Hesse1927

حزم اللغات الجاهزة ودعم الكتابة من اليمين إلى اليسار واللغة على مستوى التطبيق موضّحة في صفحة اللغات.

التنسيق

أسماء الأصناف التي تضعها البدائل الافتراضية في DataTable على عناصرها، والمتغيرات التي يقرؤها ملف تنسيقه. اضبط متغيرًا على المكوّن أو على أي عنصر يحيط به لتغيير مظهره، واستهدف الصنف فقط لما لا يغطيه متغير.

الصنفالفتحة
.sdt
.sdt__scroll—
.sdt__table
.sdt__head
.sdt__body
.sdt__foot
.sdt__row
.sdt__cell
.sdt__cell--drag—
.sdt__cell--select—
.sdt__checkbox
.sdt__sort
.sdt__sort-icon
.sdt__tree—
.sdt__tree-spacer—
.sdt__expand
.sdt__skeleton
.sdt__message
.sdt__error
.sdt__button—
.sdt__button--icon
.sdt__pagination
.sdt__pagination-buttons—
.sdt__pagination-info—
.sdt__page-size
.sdt__page-size-select—
.sdt__drag
.sdt__editor-host—
.sdt__cell-ghost—
.sdt__checkbox-cell—
.sdt__editor
.sdt__editor-input—
.sdt__editor-control—
.sdt__editor-trigger—
.sdt__editor-error—
.sdt__fill-handle
.sdt__sr-only—
المتغيرالطبقة
--sdt-accentهذا المكوّن
--sdt-bgهذا المكوّن
--sdt-borderهذا المكوّن
--sdt-checkbox-sizeهذا المكوّن
--sdt-dangerهذا المكوّن
--sdt-font-sizeهذا المكوّن
--sdt-header-bgهذا المكوّن
--sdt-hoverهذا المكوّن
--sdt-max-heightهذا المكوّن
--sdt-mutedهذا المكوّن
--sdt-padding-xهذا المكوّن
--sdt-padding-yهذا المكوّن
--sdt-radiusهذا المكوّن
--sdt-selectedهذا المكوّن
--sdt-skeleton-bgهذا المكوّن
--sdt-skeleton-bg-2هذا المكوّن
--sdt-stripeهذا المكوّن
--sdt-surfaceهذا المكوّن
--sdt-textهذا المكوّن
--ss-accentمشترك بين كل المكوّنات
--ss-borderمشترك بين كل المكوّنات
--ss-dangerمشترك بين كل المكوّنات
--ss-font-sizeمشترك بين كل المكوّنات
--ss-hoverمشترك بين كل المكوّنات
--ss-mutedمشترك بين كل المكوّنات
--ss-radiusمشترك بين كل المكوّنات
--ss-selectedمشترك بين كل المكوّنات
--ss-surfaceمشترك بين كل المكوّنات
--ss-textمشترك بين كل المكوّنات

تنتقل كل المتغيرات إلى قيمها الداكنة تحت .dark, [data-theme="dark"]، على الصفحة أو على أي عنصر يحيط بالمكوّن.

صفحة السمات تشرح المتغيرات والسمات الجاهزة.

آخر تحديث