({
onDone,
tableId,
rowId,
store: storeOrStoreId,
}: OnDoneProp & RowProps)
| 190 | }; |
| 191 | |
| 192 | const CloneRow = ({ |
| 193 | onDone, |
| 194 | tableId, |
| 195 | rowId, |
| 196 | store: storeOrStoreId, |
| 197 | }: OnDoneProp & RowProps) => { |
| 198 | const store = useStoreOrStoreById(storeOrStoreId)!; |
| 199 | const has = useHasRowCallback(store, tableId); |
| 200 | return ( |
| 201 | <NewId |
| 202 | onDone={onDone} |
| 203 | suggestedId={getNewIdFromSuggestedId(rowId, has)} |
| 204 | has={has} |
| 205 | set={useSetRowCallback( |
| 206 | tableId, |
| 207 | (newId) => newId, |
| 208 | (_, store) => store.getRow(tableId, rowId), |
| 209 | [rowId], |
| 210 | )} |
| 211 | prompt="Clone row to" |
| 212 | /> |
| 213 | ); |
| 214 | }; |
| 215 | |
| 216 | const DeleteRow = ({onDone, tableId, rowId, store}: OnDoneProp & RowProps) => ( |
| 217 | <Delete |
nothing calls this directly
no test coverage detected
searching dependent graphs…