loon-bulma-react 2026.0.13 → 2026.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,20 +21,25 @@ type DataTableColumnProp<T extends unknown = unknown> = {
21
21
  /** className voor de kolom, om een cel te stylen afhankelijk van de waarde */
22
22
  columnClass?: string | ((item: T) => string);
23
23
  };
24
- type PaginationOptionsProp = {
24
+ type DatatablePaginationOptionsProp = {
25
25
  /** tonen we paginatie? */
26
26
  hidden?: boolean;
27
27
  /** vanaf wel aantal rijen is paginatie actief */
28
28
  threshold?: number;
29
29
  /** initiele pagination number. default = 1 (first) */
30
30
  initialPage?: number;
31
- /** Default aantal rijen per pagina (-1 voor alles)*/
31
+ /** Default aantal rijen per pagina (Infinity voor alles)*/
32
32
  initialRowsPerPage?: number;
33
- /** Opties voor aantal rijen per pagina (gebruik `-1` voor alles) */
33
+ /** Opties voor aantal rijen per pagina (gebruik `Infinity` voor alles) */
34
34
  rowsPerPageOptions?: {
35
35
  label: string;
36
36
  value: number;
37
37
  }[];
38
+ /** callback voor wijzigen van de `rowsPerPage` - zodat je die (als gewenst) kan opslaan */
39
+ onRowsPerPerPageOptionChanged?: (selected: {
40
+ label: string;
41
+ value: number;
42
+ }) => void;
38
43
  };
39
44
  type DataTableProps<T extends unknown = unknown> = {
40
45
  /** De kolommen voor de DataTable
@@ -121,7 +126,8 @@ type DataTableProps<T extends unknown = unknown> = {
121
126
  footerContent?: React.ReactNode;
122
127
  itemRef?: React.RefObject<any> | null;
123
128
  id?: string;
124
- paginationOptions?: PaginationOptionsProp | undefined;
129
+ /** opties voor paginatie */
130
+ paginationOptions?: DatatablePaginationOptionsProp | undefined;
125
131
  };
126
132
  /**
127
133
  * Maak een tabel voor grote hoeveelheden data. De tabel is doorzoekbaar en heeft paginatie. Dat is allemaal uit te zetten.
@@ -37,22 +37,28 @@ type DefaultsType = {
37
37
  tags: TagSettings;
38
38
  /** default alignment settings */
39
39
  alignment: AlignmentProp;
40
- datatablePagination: PaginationOptions;
40
+ /** default settings voor de datatable paginatie */
41
+ datatablePagination: DatatablePaginationOptions;
41
42
  };
42
- export type PaginationOptions = {
43
+ export type DatatablePaginationOptions = {
43
44
  /** tonen we pagination? */
44
45
  hidden: boolean;
45
46
  /** vanaf wel aantal rijen is paginatie actief */
46
47
  threshold: number;
47
48
  /** initiele pagination number. default = 1 (first) */
48
49
  initialPage: number;
49
- /** Default aantal rijen per pagina (-1 voor alles)*/
50
+ /** Default aantal rijen per pagina (Infinity voor alles)*/
50
51
  initialRowsPerPage: number;
51
- /** Opties voor aantal rijen per pagina (gebruik value `-1` voor alles) */
52
+ /** Opties voor aantal rijen per pagina (gebruik value `Infinity` voor alles) */
52
53
  rowsPerPageOptions: {
53
54
  label: string;
54
55
  value: number;
55
56
  }[];
57
+ /** Callback functie die wordt aangeroepen als de user een andere rowsPerPage optie kiest. Zodat je deze kan opslaan (als gewenst) */
58
+ onRowsPerPerPageOptionChanged?: (option: {
59
+ label: string;
60
+ value: number;
61
+ }) => void;
56
62
  };
57
63
  /** Partial type voor het updaten van een of meer enkele settings.
58
64
  * Alle properties zijn optioneel, en kunnen dus ook weggelaten worden.
@@ -68,7 +74,7 @@ export type OptionalDefaultsType = Partial<{
68
74
  tags: Partial<TagSettings>;
69
75
  /** default alignment settings */
70
76
  alignment: Partial<AlignmentProp>;
71
- datatablePagination: Partial<PaginationOptions>;
77
+ datatablePagination: Partial<DatatablePaginationOptions>;
72
78
  }>;
73
79
  /**
74
80
  * Context voor het bijhouden van de default waardes voor de LoonBulmaReact componenten