@workday/canvas-kit-react 9.0.0-alpha.411-next.13 → 9.0.0-alpha.413-next.15
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.
- package/collection/lib/useBaseListModel.tsx +24 -12
- package/collection/lib/useCursorListModel.tsx +102 -78
- package/dialog/lib/Dialog.tsx +66 -0
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +104 -0
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts +3 -0
- package/dist/commonjs/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts +3 -0
- package/dist/commonjs/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts +4 -0
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +55 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts +107 -0
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +4 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts +3 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts +2 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts +49 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +4 -0
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +55 -0
- package/dist/commonjs/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/ListBox.d.ts +39 -0
- package/dist/commonjs/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useBaseListModel.d.ts +20 -10
- package/dist/commonjs/collection/lib/useBaseListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useBaseListModel.js +21 -10
- package/dist/commonjs/collection/lib/useCursorListModel.d.ts +171 -10
- package/dist/commonjs/collection/lib/useCursorListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useCursorListModel.js +97 -64
- package/dist/commonjs/collection/lib/useGridModel.d.ts +39 -0
- package/dist/commonjs/collection/lib/useGridModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemRegister.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListItemRegister.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListItemSelect.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListItemSelect.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListModel.d.ts +39 -0
- package/dist/commonjs/collection/lib/useListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useListResetCursorOnBlur.d.ts +1 -0
- package/dist/commonjs/collection/lib/useListResetCursorOnBlur.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
- package/dist/commonjs/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts +1 -0
- package/dist/commonjs/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts +51 -0
- package/dist/commonjs/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts +1 -0
- package/dist/commonjs/collection/lib/useOverflowListTarget.d.ts.map +1 -1
- package/dist/commonjs/collection/lib/useSelectionListModel.d.ts +39 -0
- package/dist/commonjs/collection/lib/useSelectionListModel.d.ts.map +1 -1
- package/dist/commonjs/dialog/lib/Dialog.d.ts +65 -0
- package/dist/commonjs/dialog/lib/Dialog.d.ts.map +1 -1
- package/dist/commonjs/dialog/lib/Dialog.js +65 -0
- package/dist/commonjs/menu/lib/Menu.d.ts +48 -0
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuCard.d.ts +2 -0
- package/dist/commonjs/menu/lib/MenuCard.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuContextTarget.d.ts +3 -0
- package/dist/commonjs/menu/lib/MenuContextTarget.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.d.ts +2 -0
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuList.d.ts +2 -0
- package/dist/commonjs/menu/lib/MenuList.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuPopper.d.ts +1 -0
- package/dist/commonjs/menu/lib/MenuPopper.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuTarget.d.ts +5 -0
- package/dist/commonjs/menu/lib/MenuTarget.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/useMenuModel.d.ts +45 -0
- package/dist/commonjs/menu/lib/useMenuModel.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/Popup.d.ts +1 -81
- package/dist/commonjs/popup/lib/Popup.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/Popup.js +1 -1
- package/dist/commonjs/tabs/lib/Tabs.d.ts +158 -7
- package/dist/commonjs/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsList.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsMenuPopper.d.ts +1 -0
- package/dist/commonjs/tabs/lib/TabsMenuPopper.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts +4 -0
- package/dist/commonjs/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts +2 -0
- package/dist/commonjs/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts +143 -12
- package/dist/commonjs/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBar.d.ts +104 -0
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts +3 -0
- package/dist/es6/action-bar/lib/ActionBarItem.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarList.d.ts +3 -0
- package/dist/es6/action-bar/lib/ActionBarList.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts +4 -0
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts +55 -0
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts +107 -0
- package/dist/es6/breadcrumbs/lib/Breadcrumbs.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts +4 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts +3 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts +2 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts +49 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts +4 -0
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts +55 -0
- package/dist/es6/breadcrumbs/lib/hooks/useBreadcrumbsModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/ListBox.d.ts +39 -0
- package/dist/es6/collection/lib/ListBox.d.ts.map +1 -1
- package/dist/es6/collection/lib/useBaseListModel.d.ts +20 -10
- package/dist/es6/collection/lib/useBaseListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useBaseListModel.js +22 -11
- package/dist/es6/collection/lib/useCursorListModel.d.ts +171 -10
- package/dist/es6/collection/lib/useCursorListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useCursorListModel.js +97 -64
- package/dist/es6/collection/lib/useGridModel.d.ts +39 -0
- package/dist/es6/collection/lib/useGridModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemRegister.d.ts +1 -0
- package/dist/es6/collection/lib/useListItemRegister.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemRovingFocus.d.ts +1 -0
- package/dist/es6/collection/lib/useListItemRovingFocus.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListItemSelect.d.ts +1 -0
- package/dist/es6/collection/lib/useListItemSelect.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListModel.d.ts +39 -0
- package/dist/es6/collection/lib/useListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useListResetCursorOnBlur.d.ts +1 -0
- package/dist/es6/collection/lib/useListResetCursorOnBlur.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts +1 -0
- package/dist/es6/collection/lib/useOverflowListItemMeasure.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListMeasure.d.ts +1 -0
- package/dist/es6/collection/lib/useOverflowListMeasure.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListModel.d.ts +51 -0
- package/dist/es6/collection/lib/useOverflowListModel.d.ts.map +1 -1
- package/dist/es6/collection/lib/useOverflowListTarget.d.ts +1 -0
- package/dist/es6/collection/lib/useOverflowListTarget.d.ts.map +1 -1
- package/dist/es6/collection/lib/useSelectionListModel.d.ts +39 -0
- package/dist/es6/collection/lib/useSelectionListModel.d.ts.map +1 -1
- package/dist/es6/dialog/lib/Dialog.d.ts +65 -0
- package/dist/es6/dialog/lib/Dialog.d.ts.map +1 -1
- package/dist/es6/dialog/lib/Dialog.js +65 -0
- package/dist/es6/menu/lib/Menu.d.ts +48 -0
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuCard.d.ts +2 -0
- package/dist/es6/menu/lib/MenuCard.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuContextTarget.d.ts +3 -0
- package/dist/es6/menu/lib/MenuContextTarget.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.d.ts +2 -0
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuList.d.ts +2 -0
- package/dist/es6/menu/lib/MenuList.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuPopper.d.ts +1 -0
- package/dist/es6/menu/lib/MenuPopper.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuTarget.d.ts +5 -0
- package/dist/es6/menu/lib/MenuTarget.d.ts.map +1 -1
- package/dist/es6/menu/lib/useMenuModel.d.ts +45 -0
- package/dist/es6/menu/lib/useMenuModel.d.ts.map +1 -1
- package/dist/es6/popup/lib/Popup.d.ts +1 -81
- package/dist/es6/popup/lib/Popup.d.ts.map +1 -1
- package/dist/es6/popup/lib/Popup.js +1 -1
- package/dist/es6/tabs/lib/Tabs.d.ts +158 -7
- package/dist/es6/tabs/lib/Tabs.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsItem.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsItem.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsList.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsMenuPopper.d.ts +1 -0
- package/dist/es6/tabs/lib/TabsMenuPopper.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsOverflowButton.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsOverflowButton.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsPanel.d.ts +4 -0
- package/dist/es6/tabs/lib/TabsPanel.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsPanels.d.ts +2 -0
- package/dist/es6/tabs/lib/TabsPanels.d.ts.map +1 -1
- package/dist/es6/tabs/lib/useTabsModel.d.ts +143 -12
- package/dist/es6/tabs/lib/useTabsModel.d.ts.map +1 -1
- package/package.json +3 -3
- package/popup/lib/Popup.tsx +1 -1
|
@@ -9,6 +9,7 @@ export declare const ListBoxItem: import("@workday/canvas-kit-react/common").Ele
|
|
|
9
9
|
unselectedIds: string[];
|
|
10
10
|
cursorId: string;
|
|
11
11
|
columnCount: number;
|
|
12
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
12
13
|
UNSTABLE_virtual: {
|
|
13
14
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
14
15
|
totalSize: number;
|
|
@@ -65,6 +66,7 @@ export declare const useListBox: import("@workday/canvas-kit-react/common").Beha
|
|
|
65
66
|
unselectedIds: string[];
|
|
66
67
|
cursorId: string;
|
|
67
68
|
columnCount: number;
|
|
69
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
68
70
|
UNSTABLE_virtual: {
|
|
69
71
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
70
72
|
totalSize: number;
|
|
@@ -144,6 +146,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
144
146
|
initialCursorId: string;
|
|
145
147
|
columnCount: number;
|
|
146
148
|
navigation: import("./useCursorListModel").NavigationManager;
|
|
149
|
+
pageSize: number;
|
|
147
150
|
id: string;
|
|
148
151
|
getId: (item: any) => string;
|
|
149
152
|
getTextValue: (item: any) => string;
|
|
@@ -160,6 +163,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
160
163
|
unselectedIds: string[];
|
|
161
164
|
cursorId: string;
|
|
162
165
|
columnCount: number;
|
|
166
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
163
167
|
UNSTABLE_virtual: {
|
|
164
168
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
165
169
|
totalSize: number;
|
|
@@ -181,6 +185,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
181
185
|
unselectedIds: string[];
|
|
182
186
|
cursorId: string;
|
|
183
187
|
columnCount: number;
|
|
188
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
184
189
|
UNSTABLE_virtual: {
|
|
185
190
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
186
191
|
totalSize: number;
|
|
@@ -202,6 +207,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
202
207
|
unselectedIds: string[];
|
|
203
208
|
cursorId: string;
|
|
204
209
|
columnCount: number;
|
|
210
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
205
211
|
UNSTABLE_virtual: {
|
|
206
212
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
207
213
|
totalSize: number;
|
|
@@ -226,6 +232,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
226
232
|
unselectedIds: string[];
|
|
227
233
|
cursorId: string;
|
|
228
234
|
columnCount: number;
|
|
235
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
229
236
|
UNSTABLE_virtual: {
|
|
230
237
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
231
238
|
totalSize: number;
|
|
@@ -249,6 +256,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
249
256
|
unselectedIds: string[];
|
|
250
257
|
cursorId: string;
|
|
251
258
|
columnCount: number;
|
|
259
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
252
260
|
UNSTABLE_virtual: {
|
|
253
261
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
254
262
|
totalSize: number;
|
|
@@ -270,6 +278,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
270
278
|
unselectedIds: string[];
|
|
271
279
|
cursorId: string;
|
|
272
280
|
columnCount: number;
|
|
281
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
273
282
|
UNSTABLE_virtual: {
|
|
274
283
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
275
284
|
totalSize: number;
|
|
@@ -291,6 +300,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
291
300
|
unselectedIds: string[];
|
|
292
301
|
cursorId: string;
|
|
293
302
|
columnCount: number;
|
|
303
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
294
304
|
UNSTABLE_virtual: {
|
|
295
305
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
296
306
|
totalSize: number;
|
|
@@ -312,6 +322,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
312
322
|
unselectedIds: string[];
|
|
313
323
|
cursorId: string;
|
|
314
324
|
columnCount: number;
|
|
325
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
315
326
|
UNSTABLE_virtual: {
|
|
316
327
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
317
328
|
totalSize: number;
|
|
@@ -333,6 +344,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
333
344
|
unselectedIds: string[];
|
|
334
345
|
cursorId: string;
|
|
335
346
|
columnCount: number;
|
|
347
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
336
348
|
UNSTABLE_virtual: {
|
|
337
349
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
338
350
|
totalSize: number;
|
|
@@ -354,6 +366,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
354
366
|
unselectedIds: string[];
|
|
355
367
|
cursorId: string;
|
|
356
368
|
columnCount: number;
|
|
369
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
357
370
|
UNSTABLE_virtual: {
|
|
358
371
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
359
372
|
totalSize: number;
|
|
@@ -375,6 +388,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
375
388
|
unselectedIds: string[];
|
|
376
389
|
cursorId: string;
|
|
377
390
|
columnCount: number;
|
|
391
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
378
392
|
UNSTABLE_virtual: {
|
|
379
393
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
380
394
|
totalSize: number;
|
|
@@ -396,6 +410,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
396
410
|
unselectedIds: string[];
|
|
397
411
|
cursorId: string;
|
|
398
412
|
columnCount: number;
|
|
413
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
399
414
|
UNSTABLE_virtual: {
|
|
400
415
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
401
416
|
totalSize: number;
|
|
@@ -417,6 +432,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
417
432
|
unselectedIds: string[];
|
|
418
433
|
cursorId: string;
|
|
419
434
|
columnCount: number;
|
|
435
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
420
436
|
UNSTABLE_virtual: {
|
|
421
437
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
422
438
|
totalSize: number;
|
|
@@ -438,6 +454,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
438
454
|
unselectedIds: string[];
|
|
439
455
|
cursorId: string;
|
|
440
456
|
columnCount: number;
|
|
457
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
441
458
|
UNSTABLE_virtual: {
|
|
442
459
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
443
460
|
totalSize: number;
|
|
@@ -459,6 +476,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
459
476
|
unselectedIds: string[];
|
|
460
477
|
cursorId: string;
|
|
461
478
|
columnCount: number;
|
|
479
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
462
480
|
UNSTABLE_virtual: {
|
|
463
481
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
464
482
|
totalSize: number;
|
|
@@ -482,6 +500,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
482
500
|
unselectedIds: string[];
|
|
483
501
|
cursorId: string;
|
|
484
502
|
columnCount: number;
|
|
503
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
485
504
|
UNSTABLE_virtual: {
|
|
486
505
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
487
506
|
totalSize: number;
|
|
@@ -505,6 +524,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
505
524
|
unselectedIds: string[];
|
|
506
525
|
cursorId: string;
|
|
507
526
|
columnCount: number;
|
|
527
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
508
528
|
UNSTABLE_virtual: {
|
|
509
529
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
510
530
|
totalSize: number;
|
|
@@ -529,6 +549,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
529
549
|
unselectedIds: string[];
|
|
530
550
|
cursorId: string;
|
|
531
551
|
columnCount: number;
|
|
552
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
532
553
|
UNSTABLE_virtual: {
|
|
533
554
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
534
555
|
totalSize: number;
|
|
@@ -550,6 +571,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
550
571
|
unselectedIds: string[];
|
|
551
572
|
cursorId: string;
|
|
552
573
|
columnCount: number;
|
|
574
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
553
575
|
UNSTABLE_virtual: {
|
|
554
576
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
555
577
|
totalSize: number;
|
|
@@ -571,6 +593,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
571
593
|
unselectedIds: string[];
|
|
572
594
|
cursorId: string;
|
|
573
595
|
columnCount: number;
|
|
596
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
574
597
|
UNSTABLE_virtual: {
|
|
575
598
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
576
599
|
totalSize: number;
|
|
@@ -595,6 +618,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
595
618
|
unselectedIds: string[];
|
|
596
619
|
cursorId: string;
|
|
597
620
|
columnCount: number;
|
|
621
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
598
622
|
UNSTABLE_virtual: {
|
|
599
623
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
600
624
|
totalSize: number;
|
|
@@ -618,6 +642,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
618
642
|
unselectedIds: string[];
|
|
619
643
|
cursorId: string;
|
|
620
644
|
columnCount: number;
|
|
645
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
621
646
|
UNSTABLE_virtual: {
|
|
622
647
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
623
648
|
totalSize: number;
|
|
@@ -639,6 +664,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
639
664
|
unselectedIds: string[];
|
|
640
665
|
cursorId: string;
|
|
641
666
|
columnCount: number;
|
|
667
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
642
668
|
UNSTABLE_virtual: {
|
|
643
669
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
644
670
|
totalSize: number;
|
|
@@ -660,6 +686,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
660
686
|
unselectedIds: string[];
|
|
661
687
|
cursorId: string;
|
|
662
688
|
columnCount: number;
|
|
689
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
663
690
|
UNSTABLE_virtual: {
|
|
664
691
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
665
692
|
totalSize: number;
|
|
@@ -681,6 +708,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
681
708
|
unselectedIds: string[];
|
|
682
709
|
cursorId: string;
|
|
683
710
|
columnCount: number;
|
|
711
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
684
712
|
UNSTABLE_virtual: {
|
|
685
713
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
686
714
|
totalSize: number;
|
|
@@ -702,6 +730,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
702
730
|
unselectedIds: string[];
|
|
703
731
|
cursorId: string;
|
|
704
732
|
columnCount: number;
|
|
733
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
705
734
|
UNSTABLE_virtual: {
|
|
706
735
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
707
736
|
totalSize: number;
|
|
@@ -723,6 +752,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
723
752
|
unselectedIds: string[];
|
|
724
753
|
cursorId: string;
|
|
725
754
|
columnCount: number;
|
|
755
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
726
756
|
UNSTABLE_virtual: {
|
|
727
757
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
728
758
|
totalSize: number;
|
|
@@ -744,6 +774,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
744
774
|
unselectedIds: string[];
|
|
745
775
|
cursorId: string;
|
|
746
776
|
columnCount: number;
|
|
777
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
747
778
|
UNSTABLE_virtual: {
|
|
748
779
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
749
780
|
totalSize: number;
|
|
@@ -765,6 +796,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
765
796
|
unselectedIds: string[];
|
|
766
797
|
cursorId: string;
|
|
767
798
|
columnCount: number;
|
|
799
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
768
800
|
UNSTABLE_virtual: {
|
|
769
801
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
770
802
|
totalSize: number;
|
|
@@ -786,6 +818,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
786
818
|
unselectedIds: string[];
|
|
787
819
|
cursorId: string;
|
|
788
820
|
columnCount: number;
|
|
821
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
789
822
|
UNSTABLE_virtual: {
|
|
790
823
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
791
824
|
totalSize: number;
|
|
@@ -807,6 +840,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
807
840
|
unselectedIds: string[];
|
|
808
841
|
cursorId: string;
|
|
809
842
|
columnCount: number;
|
|
843
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
810
844
|
UNSTABLE_virtual: {
|
|
811
845
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
812
846
|
totalSize: number;
|
|
@@ -828,6 +862,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
828
862
|
unselectedIds: string[];
|
|
829
863
|
cursorId: string;
|
|
830
864
|
columnCount: number;
|
|
865
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
831
866
|
UNSTABLE_virtual: {
|
|
832
867
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
833
868
|
totalSize: number;
|
|
@@ -851,6 +886,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
851
886
|
unselectedIds: string[];
|
|
852
887
|
cursorId: string;
|
|
853
888
|
columnCount: number;
|
|
889
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
854
890
|
UNSTABLE_virtual: {
|
|
855
891
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
856
892
|
totalSize: number;
|
|
@@ -874,6 +910,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
874
910
|
unselectedIds: string[];
|
|
875
911
|
cursorId: string;
|
|
876
912
|
columnCount: number;
|
|
913
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
877
914
|
UNSTABLE_virtual: {
|
|
878
915
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
879
916
|
totalSize: number;
|
|
@@ -896,6 +933,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
896
933
|
unselectedIds: string[];
|
|
897
934
|
cursorId: string;
|
|
898
935
|
columnCount: number;
|
|
936
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
899
937
|
UNSTABLE_virtual: {
|
|
900
938
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
901
939
|
totalSize: number;
|
|
@@ -961,6 +999,7 @@ export declare const ListBox: import("@workday/canvas-kit-react/common").Element
|
|
|
961
999
|
unselectedIds: string[];
|
|
962
1000
|
cursorId: string;
|
|
963
1001
|
columnCount: number;
|
|
1002
|
+
pageSizeRef: React.MutableRefObject<number>;
|
|
964
1003
|
UNSTABLE_virtual: {
|
|
965
1004
|
virtualItems: import("./react-virtual").VirtualItem[];
|
|
966
1005
|
totalSize: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../../../../collection/lib/ListBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAM,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAM/D,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../../../../collection/lib/ListBox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAM,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAM/D,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC/D;AAED,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrB,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKhB;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBL,CAAC"}
|
|
@@ -16,13 +16,18 @@ export declare const useBaseListModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
|
16
16
|
/** IDREF of the list. Children ids can be derived from this id */
|
|
17
17
|
id: string;
|
|
18
18
|
/**
|
|
19
|
-
* Optional function to return an id of an item. If not provided, the default function will
|
|
20
|
-
* the `id` property from the object of each item. If you did not provide `items`, do not
|
|
21
|
-
* this function. If you don't provided `items` and instead provide static items via
|
|
22
|
-
* will create an internal array of items where `id` is the only property and the
|
|
23
|
-
* will return the desired result.
|
|
19
|
+
* Optional function to return an id of an item. If not provided, the default function will
|
|
20
|
+
* return the `id` property from the object of each item. If you did not provide `items`, do not
|
|
21
|
+
* override this function. If you don't provided `items` and instead provide static items via
|
|
22
|
+
* JSX, the list will create an internal array of items where `id` is the only property and the
|
|
23
|
+
* default `getId` will return the desired result.
|
|
24
24
|
*/
|
|
25
25
|
getId: (item: Generic) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional function to return the text representation of an item. If not provided, the default
|
|
28
|
+
* function will return the `text` property of the object of each item or an empty string if
|
|
29
|
+
* there is no `text` property. If you did not provide `items`, do not override this function.
|
|
30
|
+
*/
|
|
26
31
|
getTextValue: (item: Generic) => string;
|
|
27
32
|
/**
|
|
28
33
|
* Array of all ids which are currently disabled. This is used for navigation to skip over items
|
|
@@ -220,13 +225,18 @@ export declare const useBaseListModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
|
220
225
|
/** IDREF of the list. Children ids can be derived from this id */
|
|
221
226
|
id: string;
|
|
222
227
|
/**
|
|
223
|
-
* Optional function to return an id of an item. If not provided, the default function will
|
|
224
|
-
* the `id` property from the object of each item. If you did not provide `items`, do not
|
|
225
|
-
* this function. If you don't provided `items` and instead provide static items via
|
|
226
|
-
* will create an internal array of items where `id` is the only property and the
|
|
227
|
-
* will return the desired result.
|
|
228
|
+
* Optional function to return an id of an item. If not provided, the default function will
|
|
229
|
+
* return the `id` property from the object of each item. If you did not provide `items`, do not
|
|
230
|
+
* override this function. If you don't provided `items` and instead provide static items via
|
|
231
|
+
* JSX, the list will create an internal array of items where `id` is the only property and the
|
|
232
|
+
* default `getId` will return the desired result.
|
|
228
233
|
*/
|
|
229
234
|
getId: (item: Generic) => string;
|
|
235
|
+
/**
|
|
236
|
+
* Optional function to return the text representation of an item. If not provided, the default
|
|
237
|
+
* function will return the `text` property of the object of each item or an empty string if
|
|
238
|
+
* there is no `text` property. If you did not provide `items`, do not override this function.
|
|
239
|
+
*/
|
|
230
240
|
getTextValue: (item: Generic) => string;
|
|
231
241
|
/**
|
|
232
242
|
* Array of all ids which are currently disabled. This is used for navigation to skip over items
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseListModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useBaseListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,
|
|
1
|
+
{"version":3,"file":"useBaseListModel.d.ts","sourceRoot":"","sources":["../../../../collection/lib/useBaseListModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAA+B,OAAO,EAAC,MAAM,kCAAkC,CAAC;AAEvF,oBAAY,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpD,eAAO,MAAM,YAAY,SAAU,GAAG,KAAG,MAExC,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,GAAG,KAAG,MAE/C,CAAC;AAEF,MAAM,WAAW,IAAI,CAAC,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC;IACT;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAmDD,eAAO,MAAM,gBAAgB;IAGzB,kEAAkE;;IAElE;;;;;;OAMG;kBACW,OAAO;IACrB;;;;OAIG;yBACkB,OAAO;IAC5B;;;OAGG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;;IA9CL;;;;OAIG;WACI,OAAO,EAAE;;;cA6GY,OAAO;mBAAa,MAAM;;;;;;;;;;;;;;;;eArB1B,KAAK,OAAO,CAAC,EAAE;;;YAoCf,MAAM;;;;;;;;;;;;;;;;eApCN,KAAK,OAAO,CAAC,EAAE;;;eAuDV,MAAM;;;;;;;;;;;;;;;;eAvDX,KAAK,OAAO,CAAC,EAAE;;;;cAqBf,OAAO;mBAAa,MAAM;;;;;;;;;;;;;;;;eArB1B,KAAK,OAAO,CAAC,EAAE;;;YAoCf,MAAM;;;;;;;;;;;;;;;;eApCN,KAAK,OAAO,CAAC,EAAE;;;eAuDV,MAAM;;;;;;;;;;;;;;;;eAvDX,KAAK,OAAO,CAAC,EAAE;;;;;;;;;;;;;;;;;;eAAf,KAAK,OAAO,CAAC,EAAE;;;QAiBzC;;;WAGG;2BACgB;YAAC,IAAI,EAAE,OAAO,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAC;QAWrD;;;WAGG;;gBACuB,MAAM;;QAUhC;;;;;;;;WAQG;+BACoB;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC;;kBA9HxB,OAAO;;IATrB,kEAAkE;;IAElE;;;;;;OAMG;kBACW,OAAO;IACrB;;;;OAIG;yBACkB,OAAO;IAC5B;;;OAGG;;IAEH;;;;;OAKG;;IAEH;;;;;OAKG;;;IA9CL;;;;OAIG;WACI,OAAO,EAAE;;;;;;;;;;;;;;;;WAwFY,KAAK,OAAO,CAAC,EAAE;;IAiBzC;;;OAGG;uBACgB;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAC;IAWrD;;;OAGG;;YACuB,MAAM;;IAUhC;;;;;;;;OAQG;2BACoB;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;;;;;;;;;;;;;;;;;eAvDZ,KAAK,OAAO,CAAC,EAAE;;;QAiBzC;;;WAGG;2BACgB;YAAC,IAAI,EAAE,OAAO,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAC;QAWrD;;;WAGG;;gBACuB,MAAM;;QAUhC;;;;;;;;WAQG;+BACoB;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC;;kBA9HxB,OAAO;EAoIvB,CAAC"}
|
|
@@ -8,8 +8,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
8
8
|
const react_virtual_1 = require("./react-virtual");
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
10
|
const defaultGetId = (item) => {
|
|
11
|
-
|
|
12
|
-
return item.id;
|
|
11
|
+
return item.id || '';
|
|
13
12
|
};
|
|
14
13
|
exports.defaultGetId = defaultGetId;
|
|
15
14
|
const defaultGetTextValue = (item) => {
|
|
@@ -57,13 +56,18 @@ exports.useBaseListModel = common_1.createModelHook({
|
|
|
57
56
|
/** IDREF of the list. Children ids can be derived from this id */
|
|
58
57
|
id: '',
|
|
59
58
|
/**
|
|
60
|
-
* Optional function to return an id of an item. If not provided, the default function will
|
|
61
|
-
* the `id` property from the object of each item. If you did not provide `items`, do not
|
|
62
|
-
* this function. If you don't provided `items` and instead provide static items via
|
|
63
|
-
* will create an internal array of items where `id` is the only property and the
|
|
64
|
-
* will return the desired result.
|
|
59
|
+
* Optional function to return an id of an item. If not provided, the default function will
|
|
60
|
+
* return the `id` property from the object of each item. If you did not provide `items`, do not
|
|
61
|
+
* override this function. If you don't provided `items` and instead provide static items via
|
|
62
|
+
* JSX, the list will create an internal array of items where `id` is the only property and the
|
|
63
|
+
* default `getId` will return the desired result.
|
|
65
64
|
*/
|
|
66
65
|
getId: (item) => item.id,
|
|
66
|
+
/**
|
|
67
|
+
* Optional function to return the text representation of an item. If not provided, the default
|
|
68
|
+
* function will return the `text` property of the object of each item or an empty string if
|
|
69
|
+
* there is no `text` property. If you did not provide `items`, do not override this function.
|
|
70
|
+
*/
|
|
67
71
|
getTextValue: (item) => (item.text || ''),
|
|
68
72
|
/**
|
|
69
73
|
* Array of all ids which are currently disabled. This is used for navigation to skip over items
|
|
@@ -89,8 +93,15 @@ exports.useBaseListModel = common_1.createModelHook({
|
|
|
89
93
|
})(config => {
|
|
90
94
|
var _a;
|
|
91
95
|
const id = common_1.useUniqueId(config.id);
|
|
96
|
+
// Optimization to not redo items when `getId` and `getTextValue` references change. They will not
|
|
97
|
+
// likely change during the lifecycle and we don't want to recalculate items when a lamba is
|
|
98
|
+
// passed instead of a stable reference.
|
|
99
|
+
const getIdRef = react_1.default.useRef(exports.defaultGetId);
|
|
100
|
+
const getTextValueRef = react_1.default.useRef(exports.defaultGetTextValue);
|
|
92
101
|
const getId = config.getId || exports.defaultGetId;
|
|
93
102
|
const getTextValue = config.getTextValue || exports.defaultGetTextValue;
|
|
103
|
+
getIdRef.current = getId;
|
|
104
|
+
getTextValueRef.current = getTextValue;
|
|
94
105
|
const [orientation] = react_1.default.useState(config.orientation || 'vertical');
|
|
95
106
|
const [UNSTABLE_defaultItemHeight, setDefaultItemHeight] = react_1.default.useState(config.defaultItemHeight);
|
|
96
107
|
const isVirtualized = config.shouldVirtualize && !!((_a = config.items) === null || _a === void 0 ? void 0 : _a.length);
|
|
@@ -98,12 +109,12 @@ exports.useBaseListModel = common_1.createModelHook({
|
|
|
98
109
|
const containerRef = react_1.default.useRef(null);
|
|
99
110
|
const items = react_1.default.useMemo(() => (config.items || []).map((item, index) => {
|
|
100
111
|
return {
|
|
101
|
-
id:
|
|
112
|
+
id: getIdRef.current(item),
|
|
102
113
|
index,
|
|
103
114
|
value: item,
|
|
104
|
-
textValue:
|
|
115
|
+
textValue: getTextValueRef.current(item),
|
|
105
116
|
};
|
|
106
|
-
}), [config.items
|
|
117
|
+
}), [config.items]);
|
|
107
118
|
const [staticItems, setStaticItems] = react_1.default.useState([]);
|
|
108
119
|
const UNSTABLE_virtual = react_virtual_1.useVirtual({
|
|
109
120
|
size: items.length,
|