{
// Native copy (menu, macOS) would take only the mounted rows.
if (!allSelected()) return;
e.preventDefault();
e.clipboardData.setData("text/plain", model.text());
}}
onPaste={onPaste}
data-autofocus=""
>
{items.map((item) => {
const row = rows[item.index];
if (!row) {
return (
{pendingInput}
);
}
if (row.kind === "fold") {
return (
{foldButton(row.fold, false)}
);
}
const line = lines[row.index];
if (!line) return null;
return (
{row.fold && foldButton(row.fold, true)}
{inputInline && item.index === rows.length - 1 && pendingInput}
{"\n"}
);
})}