@@ -6289,7 +6289,64 @@ export function WithNestedRowsWithThumbnailsOneCellNonSelectable() {
6289
6289
) ;
6290
6290
}
6291
6291
6292
- export function WithLongDataSet ( ) {
6292
+ export function WithLongDataSetNonSelectable ( ) {
6293
+ const orders = Array . from ( Array ( 100 ) . keys ( ) ) . map ( ( i ) => ( {
6294
+ id : `${ i } ` ,
6295
+ order : i ,
6296
+ date : 'Jul 20 at 4:34pm' ,
6297
+ customer : 'Jaydon Stanton' ,
6298
+ total : `$969.44${ i } ` ,
6299
+ paymentStatus : < Badge progress = "complete" > Paid</ Badge > ,
6300
+ fulfillmentStatus : < Badge progress = "incomplete" > Unfulfilled</ Badge > ,
6301
+ } ) ) ;
6302
+
6303
+ const resourceName = {
6304
+ singular : 'order' ,
6305
+ plural : 'orders' ,
6306
+ } ;
6307
+
6308
+ const rowMarkup = orders . map (
6309
+ (
6310
+ { id, order, date, customer, total, paymentStatus, fulfillmentStatus} ,
6311
+ index ,
6312
+ ) => (
6313
+ < IndexTable . Row id = { id } key = { id } position = { index } >
6314
+ < IndexTable . Cell >
6315
+ < Text variant = "bodyMd" fontWeight = "bold" as = "span" >
6316
+ { order }
6317
+ </ Text >
6318
+ </ IndexTable . Cell >
6319
+ < IndexTable . Cell > { date } </ IndexTable . Cell >
6320
+ < IndexTable . Cell > { customer } </ IndexTable . Cell >
6321
+ < IndexTable . Cell > { total } </ IndexTable . Cell >
6322
+ < IndexTable . Cell > { paymentStatus } </ IndexTable . Cell >
6323
+ < IndexTable . Cell > { fulfillmentStatus } </ IndexTable . Cell >
6324
+ </ IndexTable . Row >
6325
+ ) ,
6326
+ ) ;
6327
+
6328
+ return (
6329
+ < LegacyCard >
6330
+ < IndexTable
6331
+ resourceName = { resourceName }
6332
+ itemCount = { orders . length }
6333
+ headings = { [
6334
+ { title : 'Order' } ,
6335
+ { title : 'Date' } ,
6336
+ { title : 'Customer' } ,
6337
+ { title : 'Total' , alignment : 'end' } ,
6338
+ { title : 'Payment status' } ,
6339
+ { title : 'Fulfillment status' } ,
6340
+ ] }
6341
+ selectable = { false }
6342
+ >
6343
+ { rowMarkup }
6344
+ </ IndexTable >
6345
+ </ LegacyCard >
6346
+ ) ;
6347
+ }
6348
+
6349
+ export function WithLongDataSetSelectable ( ) {
6293
6350
const orders = Array . from ( Array ( 100 ) . keys ( ) ) . map ( ( i ) => ( {
6294
6351
id : `${ i } ` ,
6295
6352
order : i ,
@@ -6333,6 +6390,21 @@ export function WithLongDataSet() {
6333
6390
) ,
6334
6391
) ;
6335
6392
6393
+ const bulkActions = [
6394
+ {
6395
+ content : 'Add tags' ,
6396
+ onAction : ( ) => console . log ( 'Todo: implement bulk add tags' ) ,
6397
+ } ,
6398
+ {
6399
+ content : 'Remove tags' ,
6400
+ onAction : ( ) => console . log ( 'Todo: implement bulk remove tags' ) ,
6401
+ } ,
6402
+ {
6403
+ content : 'Delete customers' ,
6404
+ onAction : ( ) => console . log ( 'Todo: implement bulk delete' ) ,
6405
+ } ,
6406
+ ] ;
6407
+
6336
6408
return (
6337
6409
< LegacyCard >
6338
6410
< IndexTable
@@ -6343,14 +6415,15 @@ export function WithLongDataSet() {
6343
6415
}
6344
6416
onSelectionChange = { handleSelectionChange }
6345
6417
headings = { [
6346
- { title : 'Order' } ,
6418
+ { title : 'Order' , hidden : true } ,
6347
6419
{ title : 'Date' } ,
6348
6420
{ title : 'Customer' } ,
6349
6421
{ title : 'Total' , alignment : 'end' } ,
6350
6422
{ title : 'Payment status' } ,
6351
6423
{ title : 'Fulfillment status' } ,
6352
6424
] }
6353
- selectable = { false }
6425
+ bulkActions = { bulkActions }
6426
+ selectable
6354
6427
>
6355
6428
{ rowMarkup }
6356
6429
</ IndexTable >
0 commit comments