- {(provided, snapshot) => (
-
- t.transitions.create("background"),
- "&:hover": {
- background: (t) => t.palette.action.hover,
- },
- }
- : undefined),
- ...(snapshot.isDragging
- ? ({
- ...paper(1),
- ...acrylic,
- } as SxProps)
- : undefined),
- }}
- >
- {renderEditor?.({
- value,
- onValueChange: (e: any) => onChangeItem(id ?? i, e, enabled),
- handle: sortable && (
-
-
-
- ),
- content: (
-
- {cloneElement(editor, {
- onDelete: () => onDeleteItem(id ?? i),
- autoFocus,
- value,
- key: id ?? i,
- onValueChange: (e: any) =>
- onChangeItem(id ?? i, e, enabled),
- onChange: (e: any) =>
- onChangeItem(id ?? i, e.target.value, enabled),
- ref: (e: HTMLElement | null) => setField(e),
- })}
-
- ),
- extras: (
-
- {toggleable && (
- onChangeItem(id ?? i, value, v)}
- checked={enabled}
- />
- )}
- {editable && (
- {
- if (field?.focus) {
- field.focus();
- }
- }}
- >
-
-
- )}
- {deletable && (
- onDeleteItem(id ?? i)}
- sx={{ color: (t) => t.palette.text.secondary }}
- >
-
-
- )}
- {getExtras && getExtras(value)}
-
- ),
- })}
-
-
- )}
-
- );
-}
-
-// a little function to help us with reordering the result
-function reorder