(props: OnDoneProp & TableProps)
| 370 | }); |
| 371 | |
| 372 | const AddRow = (props: OnDoneProp & TableProps) => { |
| 373 | const has = useHasRowCallback(props.store, props.tableId); |
| 374 | return NewId({ |
| 375 | onDone: props.onDone, |
| 376 | suggestedId: getNewIdFromSuggestedId('row', has), |
| 377 | has, |
| 378 | set: useSetRowCallback( |
| 379 | props.tableId, |
| 380 | (newId) => newId, |
| 381 | (_, store) => |
| 382 | objNew( |
| 383 | arrayMap(store.getTableCellIds(props.tableId), (cellId) => [ |
| 384 | cellId, |
| 385 | '', |
| 386 | ]), |
| 387 | ), |
| 388 | ), |
| 389 | prompt: 'Add row', |
| 390 | }); |
| 391 | }; |
| 392 | |
| 393 | const CloneTable = (props: OnDoneProp & TableProps) => { |
| 394 | const store = useStoreOrStoreById(props.store)(); |
nothing calls this directly
no test coverage detected
searching dependent graphs…