({
onDone,
tableId,
rowId,
store: storeOrStoreId,
}: OnDoneProp & RowProps)
| 161 | }; |
| 162 | |
| 163 | const AddCell = ({ |
| 164 | onDone, |
| 165 | tableId, |
| 166 | rowId, |
| 167 | store: storeOrStoreId, |
| 168 | }: OnDoneProp & RowProps) => { |
| 169 | const store = useStoreOrStoreById(storeOrStoreId)!; |
| 170 | const has = useCallback( |
| 171 | (cellId: Id) => store.hasCell(tableId, rowId, cellId), |
| 172 | [store, tableId, rowId], |
| 173 | ); |
| 174 | return ( |
| 175 | <NewId |
| 176 | onDone={onDone} |
| 177 | suggestedId={getNewIdFromSuggestedId('cell', has)} |
| 178 | has={has} |
| 179 | set={useSetCellCallback( |
| 180 | tableId, |
| 181 | rowId, |
| 182 | (newId: string) => newId, |
| 183 | () => '', |
| 184 | [], |
| 185 | store, |
| 186 | )} |
| 187 | prompt="Add cell" |
| 188 | /> |
| 189 | ); |
| 190 | }; |
| 191 | |
| 192 | const CloneRow = ({ |
| 193 | onDone, |
nothing calls this directly
no test coverage detected
searching dependent graphs…