({onDone, tableId, store}: OnDoneProp & TableProps)
| 84 | // -- |
| 85 | |
| 86 | const AddRow = ({onDone, tableId, store}: OnDoneProp & TableProps) => { |
| 87 | const has = useHasRowCallback(store, tableId); |
| 88 | return ( |
| 89 | <NewId |
| 90 | onDone={onDone} |
| 91 | suggestedId={getNewIdFromSuggestedId('row', has)} |
| 92 | has={has} |
| 93 | set={useSetRowCallback( |
| 94 | tableId, |
| 95 | (newId) => newId, |
| 96 | (_, store) => |
| 97 | objNew( |
| 98 | arrayMap(store.getTableCellIds(tableId), (cellId) => [cellId, '']), |
| 99 | ), |
| 100 | )} |
| 101 | prompt="Add row" |
| 102 | /> |
| 103 | ); |
| 104 | }; |
| 105 | |
| 106 | const CloneTable = ({ |
| 107 | onDone, |
nothing calls this directly
no test coverage detected
searching dependent graphs…