• Start
  • Blogg
  • Kom igång
  • Riktlinjer
  • Komponenter
  • Changelog
  • Tillgänglighet
  • Statistik
  • Inställningar

Komponenter

Komponenter

​
​

Inga resultat hittade, prova med andra sökvillkor.

Data Grid

Data Grid

5.3.13

Data Grids display information in a way that’s easy to scan, so that users can look for patterns and insights. They can be embedded in primary content, such as cards.

Demo
Props
Installation
Länkar
Best practices
Tillgänglighet
Change log
Statistik

Demo

Props

Se fullständing dokumentation(öppnas i ny flik)
NamnTypBeskrivning

actionButtons

Action buttons for the data grid, either a static array or a function returning an array based on selected rows.

autoHeight

booleanIf true, the Data Grid height is dynamic and follows the number of rows in the Data Grid.

checkboxColumnWidth

numberWidth of the checkbox column.

checkboxes

booleanIf true, a checkbox column will be added to the grid.

columns *

DataGridColumnProps[]Set of columns of type DataGridColumnProps<T>.

contextMenu

DataGridRowActionMenuTypeContext menu configuration for each row, either as a static menu or a function returning a menu based on the row data.

disableSelectionOnClick

booleanIf true, the grid will not trigger row selection on click.

elevation

"undefined" | "1" | "2"Elevation of the chip. Used primarily in dark mode to handle modals and layers.

fillHeight

booleanIf true, the grid will fill the height of the parent container.

fillHeightMinHeight

numberMinimum height of the grid when fillHeight is true.

fillHeightOffset

numberOffset of the grid when fillHeight is true.

filters

FilterModel[]Filters for the data grid.

height

string | numberHeight of the data grid.

hoverMenuItems

Hover menu items, either a static array or a function returning items based on row data.

lang *

stringLanguage used for internal translations.

maxHeight

string | numberMaximum height of the data grid.

negativeMargins

booleanNegative horizontal margins.

onRowMouseOver

(row: undefined | T) => voidCallback function that is triggered when a row is hovered over.

pagination

booleanIf true, pagination is enabled.

quickFilterExcludeHiddenColumns

booleanIf false, the quick filter will also consider cell values from hidden columns.

quickFilterValues

unknown[]Values used for quick filtering the data grid.

width

string | numberWidth of the data grid.

Installation

Kodexempel
npm install @sj-ab/component-library.ui.data-grid

Länkar

  • Storybook

  • Figma

  • Bit.cloud

Best practices

MUI X-licens

För att använda vår DataGrid-komponent i en produktionsmiljö krävs en giltig kommersiell MUI X-licens (antingen Pro eller Premium). Utan en aktiv licens kommer användare att stöta på vattenstämplar och varningar i konsolen, vilket kan försämra användarupplevelsen

Tillgänglighet

Data Grid har i nuläget kända tillgänglighetsproblem för användare med hjälpmedel och måste användas med försiktighet.

Fokusmarkeringar

Komponenter och element som används i Data Grid kan vara i behov av anpassade fokusmarkeringar – läs mer här: Bra att veta om fokusmarkeringar.

Change log

  • Adds new focus-visible markings.

    5.3.0
  • Fix DataGrid accessibility issues

    5.2.3
  • Updated muix packages

    5.2.0
  • Add badge to buttons

    5.1.13
  • Upgrade to React 19

    5.1.0

Statistik