smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Jobs · Components

JobList

Display a filterable, sortable list of background jobs.

Public export

typescript
import { JobList } from '@happyvertical/smrt-jobs/svelte';
Import path
@happyvertical/smrt-jobs/svelte
Props
12
Props described
12 of 12
Bindable state
0
Callback events
5
Verified release
0.62.10

Props

NameTypeRequiredDescription
jobsJobData[]YesJobs to display
loadingbooleanNoLoading state
selectablebooleanNoSelectable rows
selectedSet<string>NoSelected job IDs
showActionsbooleanNoShow actions column
onSelectionChange(selected: Set<string>) => voidNoCallback when selection changes
onJobClick(job: JobData) => voidNoCallback when job is clicked
onRetry(job: JobData) => voidNoCallback when retry is clicked
onCancel(job: JobData) => voidNoCallback when cancel is clicked
emptySnippetNoEmpty state snippet
sortListSortNoCurrent order. Omitted: rows render as supplied (headers show no sort) until a header is activated.
onSortChange(sort: ListSort) => voidNoCalled when a header is activated. When given, the parent owns the order (e.g. a server-sorted list) and `jobs` are rendered as supplied.

Bindable state

This component has no bindable public state.

Callback events

  • onSelectionChange(selected: Set<string>) => void
  • onJobClick(job: JobData) => void
  • onRetry(job: JobData) => void
  • onCancel(job: JobData) => void
  • onSortChange(sort: ListSort) => void

Examples and explanation