🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

@isoftdata/svelte-table-card-footer

Package Overview
Dependencies
Maintainers
12
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@isoftdata/svelte-table-card-footer

latest
npmnpm
Version
2.3.4
Version published
Maintainers
12
Created
Source

Svelte TableCardFooter

Screenshot of the attachment component

Install

pnpm i @isoftdata/svelte-table-card-footer

A Note on Types

The generic type I here represents an item in a table, outputted by one of the following props on the Table component, sortedRows,filteredRows, currentPageRows, or otherwise extend the IndexedRowProps interface exportd by the Table component.

Breaking changes

2.0.0

  • Require Svelte 5
  • Slots -> Snippets
  • CSVs will no longer include uuid or originalIndex columns, as those are just metadata fields that the user won't care about.

Props

NameTypeDescriptionDefault Value
selectedIdsArray<I[keyof I]> | SvelteSet<I[keyof I]>An array or SvelteSet of selected item IDs. You should probably bind: this.Required
itemsArray<I>An array of items to export to CSV. This should be sortedRows, filteredRows or currentPageRows from the Table component.Required
idKeykeyof IThe unique key on each object in the items array used to track selected items. **This should be the same value as rowSelectionIdProp on the Table component.'uuid'
showCountbooleanWhether to show the total count of items in the footertrue
showExportAllbooleanWhether to show the "Export All" buttontrue
showExportSelectedbooleanWhether to show the "Export Selected" button (when items are selected)true
showClearSelectionbooleanWhether to show the "Clear Selection" button (when items are selected)true
exportFileNamestringThe file name for the exported CSV file'list-export'
exportButtonClassClassValue | undefinedThe class to apply to the export csv buttonsundefined
exportButtonColorComponentProps<Button>['color']The BootStrap color of the export button'primary'
exportButtonOutlinebooleanWhether the export button should be outlinedtrue
clearSelectionButtonClassClassValue | undefinedThe class to apply to the "Clear Selection" buttonundefined
clearSelectionButtonColorComponentProps<Button>['color']The BootStrap color of the clear selection button'warning'
clearSelectionButtonOutlinebooleanWhether the clear selection button should be outlinedtrue
exportAllLabelstring | Snippet<[{ totalCount: number}]>The label for the "Export All" buttonundefined
exportSelectedLabelstring | Snippet<[{ selectedCount: number, totalCount: number}]>The label for the "Export {count} Selected" buttonundefined
countDescriptionstring | Snippet<[{ selectedCount: number, totalCount: number}]>The description for the item count at the bottomundefined
footerClassstringAny additional classes to add to the div.card-footer.d-flex''
makeCsvItem(item: I, index: number) => unknownIf passed, will be used to create the object for each CSV row. That way, you don't have to keep a reference to "rows for csv" in the consuming componentA function that removes uuid and originalIndex from the object

Snippets

  • children - The content to be displayed before (to the left of) the export and clear selection buttons.
  • right - The content to be displayed after (to the left of) the buttons.

Functions

You can call either of these functions to trigger a CSV download

  • downloadCsv - downloads the CSV of all items
  • downloadSelectedCsv - downloads the CSV of all selected items

Example

<script lang="ts">
	import type { Column, IndexedRowProps } from '@isoftdata/svelte-table'

	import TableCardFooter from '@isoftdata/svelte-table-card-footer'
	import Table from '@isoftdata/svelte-table'

	type Person = {
		id: string
		num: number
		name: string
		email: string
	}

	let columns: Array<Column> = [
		// stuff
	]

	let rows: Array<Person> = [
		// stuff
	]

	let selectedRowIds: Array<Person[keyof Person]> = []
	let currentPageRows: Array<Person & IndexedRowProps>

</script>

	<div class="card">
		<div class="card-header">
			<h4>Example Table Card Footer</h4>
			<h6>The <code>TableCardFooter</code> is not wrapped in a <code>div.table-footer</code> because it contains one.</h6>
		</div>
		<div class="card-body">
			<Table
				{columns}
				{rows}
				selectionEnabled
				bind:currentPageRows
				rowSelectionIdProp="id"
				bind:selectedRowIds
			/>
		</div>
		<TableCardFooter
			idKey="id"
			items={currentPageRows}
			bind:selectedIds={selectedRowIds}
		/>
	</div>```

FAQs

Package last updated on 11 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts