You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
orderBy?: OrderBy// order by column. If undefined, the table is unordered, the sort elements are hidden and the interactions are disabled.
77
76
onOrderByChange?: (orderBy: OrderBy)=>void// callback to call when a user interaction changes the order. The interactions are disabled if undefined.
78
-
selectionAndAnchor?: SelectionAndAnchor// selection and anchor rows. If undefined, the selection is hidden and the interactions are disabled.
79
-
onSelectionAndAnchorChange?: (selectionAndAnchor: SelectionAndAnchor)=>void// callback to call when a user interaction changes the selection. The interactions are disabled if undefined.
77
+
selection?: Selection// selection and anchor rows. If undefined, the selection is hidden and the interactions are disabled.
78
+
onSelectionChange?: (selection: Selection)=>void// callback to call when a user interaction changes the selection. The interactions are disabled if undefined.
80
79
}
81
80
82
81
functionrowLabel(rowIndex?: number): string{
@@ -101,8 +100,8 @@ export default function HighTable({
@@ -173,76 +172,76 @@ export default function HighTable({
173
172
174
173
/**
175
174
* Four modes:
176
-
* - controlled (selection and onSelectionAndAnchorChange are defined): the parent controls the selection and receives the user interactions. No local state.
177
-
* - controlled read-only (selection is defined, onSelectionAndAnchorChange is undefined): the parent controls the selection and the user interactions are disabled. No local state.
178
-
* - uncontrolled (selection is undefined, onSelectionAndAnchorChange is defined): the component controls the selection and the user interactions. Local state.
179
-
* - disabled (selection and onSelectionAndAnchorChange are undefined): the selection is hidden and the user interactions are disabled. No local state.
175
+
* - controlled (selection and onSelectionChange are defined): the parent controls the selection and receives the user interactions. No local state.
176
+
* - controlled read-only (selection is defined, onSelectionChange is undefined): the parent controls the selection and the user interactions are disabled. No local state.
177
+
* - uncontrolled (selection is undefined, onSelectionChange is defined): the component controls the selection and the user interactions. Local state.
178
+
* - disabled (selection and onSelectionChange are undefined): the selection is hidden and the user interactions are disabled. No local state.
console.warn('The component selection is controlled (is has no local state) because "selection" was initially defined. "selection" cannot be set to undefined now (it is set back to the initial value).')
189
-
selectionAndAnchor=initialSelection
188
+
selection=initialSelection
190
189
}else{
191
-
selectionAndAnchor=propSelection
190
+
selection=propSelection
192
191
}
193
192
}else{
194
193
if(propSelection!==undefined){
195
194
console.warn('The component selection is uncontrolled (it only has a local state) because "selection" was initially undefined. "selection" cannot be set to a value now and is ignored.')
196
195
}
197
-
if(propOnSelectionAndAnchorChange===undefined){
198
-
// The component selection is disabled because onSelectionAndAnchorChange is undefined. If you want to enable selection, you must provide onSelectionAndAnchorChange
199
-
selectionAndAnchor=undefined
196
+
if(propOnSelectionChange===undefined){
197
+
// The component selection is disabled because onSelectionChange is undefined. If you want to enable selection, you must provide onSelectionChange
0 commit comments