Deselect Table Rows
After running getSelectedTableRows
on a function, you may want to deselect all of the table rows for an optimal user experience.
Props
id string
The ID of the table that you are targeting
Returns
void
This function does not return a value
<script>
import { Table, TableHeader, TableRow, getSelectedTableRows } from "bubbles-ui";
<Table id="table-id">
<TableHeader
cells={[
{
checkbox: true,
options: [
{
label: "Print Selected Rows To Console",
value: "label1",
onselect: (event) => {
const ids = getSelectedTableRows("table-id");
deselectTableRows("table-id");
},
},
],
},
{ label: "Name" },
{ label: "Weight" },
{ label: "Type(s)" },
]}
>
<!-- Your table rows would go here -->
</TableHeader>
</Table>;
</script>