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

Function Delete

src/ui-solid-inspector/index.tsx:305–325  ·  view source on GitHub ↗
(props: {
  readonly onClick: () => void;
  readonly prompt?: string;
})

Source from the content-addressed store, hash-verified

303};
304
305const Delete = (props: {
306 readonly onClick: () => void;
307 readonly prompt?: string;
308}) => {
309 const handleKeyDown = (event: KeyboardEvent) => {
310 if (event.key == 'Enter') {
311 event.preventDefault();
312 props.onClick();
313 }
314 };
315
316 document.addEventListener('keydown', handleKeyDown);
317 onCleanup(() => document.removeEventListener('keydown', handleKeyDown));
318
319 return (
320 <>
321 {(props.prompt ?? 'Delete') + '? '}
322 <img onClick={props.onClick} title="Confirm" class="ok" />
323 </>
324 );
325};
326
327const Actions = (props: {
328 readonly left?: JSXElement;

Callers 6

DeleteTablesFunction · 0.70
DeleteTableFunction · 0.70
DeleteRowFunction · 0.70
CellDeleteFunction · 0.70
DeleteValuesFunction · 0.70
DeleteValueFunction · 0.70

Calls 2

addEventListenerMethod · 0.80
removeEventListenerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…