My table has five columns.
I would like to add the ability to drag rows up or down. That is, when the user hovers over a row and then hovers over a button (in the first column), I would like the user to be able to move that column up or down.
I have not found similar solutions anywhere, and I would be very grateful for your help
export default function App() {
return (
<table className="zui">
<tbody style={{ fontSize: "40px" }}>
{nodes.map((val, key) => (
<tr key={key}>
<td>
<AppsIcon className="sss" />
</td>
<td
style={{
paddingLeft: "20px"
}}
>
{val.name}
</td>
<td>{val.length}</td>
<td>{val.hotkey}</td>
<td>{val.isActivness}</td>
</tr>
))}
</tbody>
</table>
);
}
styles.css
.sss {
visibility: hidden;
}
tr:hover .sss {
background: gray;
visibility: visible;
}
tr:hover {
background: gray;
visibility: visible;
}
td:first-child {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
td:last-child {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
You can achieve by this code.