MCPcopy Index your code
hub / github.com/tinyplex/tinybase / CloneRow

Function CloneRow

src/ui-react-inspector/actions/tables.tsx:192–214  ·  view source on GitHub ↗
({
  onDone,
  tableId,
  rowId,
  store: storeOrStoreId,
}: OnDoneProp & RowProps)

Source from the content-addressed store, hash-verified

190};
191
192const 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
216const DeleteRow = ({onDone, tableId, rowId, store}: OnDoneProp & RowProps) => (
217 <Delete

Callers

nothing calls this directly

Calls 5

useStoreOrStoreByIdFunction · 0.90
getNewIdFromSuggestedIdFunction · 0.90
useSetRowCallbackFunction · 0.90
useHasRowCallbackFunction · 0.70
getRowMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…