CRUD / foldkit-mixins-crud

RowListInput

interface · packages/mixins-crud/src/index.ts:99

interface RowListInput<Row, Message> {
  readonly page: RemoteData<Page<Row>>
  readonly row: (row: Row, h: HtmlBuilder<Message>) => ReadonlyArray<Html>
  readonly onOpen?: ((row: Row) => Message) | undefined
  readonly onMore?: Message | undefined
  readonly onRetry?: Message | undefined
  readonly rowKey?: ((row: Row) => string) | undefined
  readonly words?: ViewWords | undefined
}

What a RowListView's drawings may read, and what the application gives it.

Members

RowListInput.page

property · packages/mixins-crud/src/index.ts:100

readonly page: RemoteData<Page<Row>>

RowListInput.row

property · packages/mixins-crud/src/index.ts:102

readonly row: (row: Row, h: HtmlBuilder<Message>) => ReadonlyArray<Html>

Draws one row's content. The whole row is a button when onOpen is given.

RowListInput.onOpen

property · packages/mixins-crud/src/index.ts:104

readonly onOpen?: ((row: Row) => Message) | undefined

Opens a row. Given, the row's drawing becomes a button that sends it.

RowListInput.onMore

property · packages/mixins-crud/src/index.ts:106

readonly onMore?: Message | undefined

Loads the next page. Shown while the page has one.

RowListInput.onRetry

property · packages/mixins-crud/src/index.ts:108

readonly onRetry?: Message | undefined

Asks again after a failed read. Given, a failed list shows a button that sends it.

RowListInput.rowKey

property · packages/mixins-crud/src/index.ts:110

readonly rowKey?: ((row: Row) => string) | undefined

What identifies a row across renders. Default its id, else its position.

RowListInput.words

property · packages/mixins-crud/src/index.ts:111

readonly words?: ViewWords | undefined