Load More

ページ分割されたリスト末尾の「さらに表示」ボタン。残り件数、読み込み中の状態、エラー時の再試行に対応。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 対応

使い方

  • Meeting 1
  • Meeting 2
  • Meeting 3

インポート

ts
import {
  SoneLoadMoreComponent,
} from "@surface-one/angular/load-more";

API リファレンス

SoneLoadMoreComponentコンポーネント

`<sone-load-more>` — the "Show more" button at the end of a paged list. It emits `(load)`; the owner fetches the next page and sets `busy` meanwhile (the button stays focusable, `aria-disabled`, and shows a spinner with `busyLabel`). `remaining` adds the count left to the label — "Show more (12)" — and hides the whole thing at 0. When the last page failed, set `error`: the message is announced (`role="alert"`) and the button becomes `retryLabel`.

セレクター
sone-load-more
入力
名前型 デフォルト
busy

The next page is loading.

booleanfalse
remaining

How many items are left; shown in the label, and `0` hides the control. `null` = unknown.

number | nullnull
error

Why the last load failed; shown above a retry button.

string | nullnull
label—$localize`Show more`
busyLabel—$localize`Loading…`
retryLabel—$localize`Try again`
alignLoadMoreAlign"center"
出力
名前型
load

Load the next page (or retry the failed one). Never emitted while `busy`.

void