mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-03 02:32:00 +08:00
Wrap Checkbox with IconButton
This commit is contained in:
@@ -191,14 +191,16 @@ function ActiveTasksTable(props: Props & ReduxProps) {
|
|||||||
padding="checkbox"
|
padding="checkbox"
|
||||||
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
||||||
>
|
>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
indeterminate={numSelected > 0 && numSelected < rowCount}
|
<Checkbox
|
||||||
checked={rowCount > 0 && numSelected === rowCount}
|
indeterminate={numSelected > 0 && numSelected < rowCount}
|
||||||
onChange={handleSelectAllClick}
|
checked={rowCount > 0 && numSelected === rowCount}
|
||||||
inputProps={{
|
onChange={handleSelectAllClick}
|
||||||
"aria-label": "select all tasks shown in the table",
|
inputProps={{
|
||||||
}}
|
"aria-label": "select all tasks shown in the table",
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{columns.map((col) => (
|
{columns.map((col) => (
|
||||||
<TableCell
|
<TableCell
|
||||||
@@ -293,12 +295,14 @@ function Row(props: RowProps) {
|
|||||||
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
||||||
>
|
>
|
||||||
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
<Checkbox
|
||||||
props.onSelectChange(event.target.checked)
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||||
}
|
props.onSelectChange(event.target.checked)
|
||||||
checked={props.isSelected}
|
}
|
||||||
/>
|
checked={props.isSelected}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
@@ -218,14 +218,16 @@ function ArchivedTasksTable(props: Props & ReduxProps) {
|
|||||||
padding="checkbox"
|
padding="checkbox"
|
||||||
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
||||||
>
|
>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
indeterminate={numSelected > 0 && numSelected < rowCount}
|
<Checkbox
|
||||||
checked={rowCount > 0 && numSelected === rowCount}
|
indeterminate={numSelected > 0 && numSelected < rowCount}
|
||||||
onChange={handleSelectAllClick}
|
checked={rowCount > 0 && numSelected === rowCount}
|
||||||
inputProps={{
|
onChange={handleSelectAllClick}
|
||||||
"aria-label": "select all tasks shown in the table",
|
inputProps={{
|
||||||
}}
|
"aria-label": "select all tasks shown in the table",
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{columns.map((col) => (
|
{columns.map((col) => (
|
||||||
<TableCell
|
<TableCell
|
||||||
@@ -332,12 +334,14 @@ function Row(props: RowProps) {
|
|||||||
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
||||||
>
|
>
|
||||||
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
<Checkbox
|
||||||
props.onSelectChange(event.target.checked)
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||||
}
|
props.onSelectChange(event.target.checked)
|
||||||
checked={props.isSelected}
|
}
|
||||||
/>
|
checked={props.isSelected}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
@@ -218,14 +218,16 @@ function PendingTasksTable(props: Props & ReduxProps) {
|
|||||||
padding="checkbox"
|
padding="checkbox"
|
||||||
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
||||||
>
|
>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
indeterminate={numSelected > 0 && numSelected < rowCount}
|
<Checkbox
|
||||||
checked={rowCount > 0 && numSelected === rowCount}
|
indeterminate={numSelected > 0 && numSelected < rowCount}
|
||||||
onChange={handleSelectAllClick}
|
checked={rowCount > 0 && numSelected === rowCount}
|
||||||
inputProps={{
|
onChange={handleSelectAllClick}
|
||||||
"aria-label": "select all tasks shown in the table",
|
inputProps={{
|
||||||
}}
|
"aria-label": "select all tasks shown in the table",
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{columns.map((col) => (
|
{columns.map((col) => (
|
||||||
<TableCell
|
<TableCell
|
||||||
@@ -334,12 +336,14 @@ function Row(props: RowProps) {
|
|||||||
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
||||||
>
|
>
|
||||||
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
<Checkbox
|
||||||
props.onSelectChange(event.target.checked)
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||||
}
|
props.onSelectChange(event.target.checked)
|
||||||
checked={props.isSelected}
|
}
|
||||||
/>
|
checked={props.isSelected}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
@@ -248,14 +248,16 @@ function RetryTasksTable(props: Props & ReduxProps) {
|
|||||||
padding="checkbox"
|
padding="checkbox"
|
||||||
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
||||||
>
|
>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
indeterminate={numSelected > 0 && numSelected < rowCount}
|
<Checkbox
|
||||||
checked={rowCount > 0 && numSelected === rowCount}
|
indeterminate={numSelected > 0 && numSelected < rowCount}
|
||||||
onChange={handleSelectAllClick}
|
checked={rowCount > 0 && numSelected === rowCount}
|
||||||
inputProps={{
|
onChange={handleSelectAllClick}
|
||||||
"aria-label": "select all tasks shown in the table",
|
inputProps={{
|
||||||
}}
|
"aria-label": "select all tasks shown in the table",
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{columns.map((col) => (
|
{columns.map((col) => (
|
||||||
<TableCell
|
<TableCell
|
||||||
@@ -367,12 +369,14 @@ function Row(props: RowProps) {
|
|||||||
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
||||||
>
|
>
|
||||||
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
<Checkbox
|
||||||
props.onSelectChange(event.target.checked)
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||||
}
|
props.onSelectChange(event.target.checked)
|
||||||
checked={props.isSelected}
|
}
|
||||||
/>
|
checked={props.isSelected}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
@@ -245,14 +245,16 @@ function ScheduledTasksTable(props: Props & ReduxProps) {
|
|||||||
padding="checkbox"
|
padding="checkbox"
|
||||||
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
classes={{ stickyHeader: classes.stickyHeaderCell }}
|
||||||
>
|
>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
indeterminate={numSelected > 0 && numSelected < rowCount}
|
<Checkbox
|
||||||
checked={rowCount > 0 && numSelected === rowCount}
|
indeterminate={numSelected > 0 && numSelected < rowCount}
|
||||||
onChange={handleSelectAllClick}
|
checked={rowCount > 0 && numSelected === rowCount}
|
||||||
inputProps={{
|
onChange={handleSelectAllClick}
|
||||||
"aria-label": "select all tasks shown in the table",
|
inputProps={{
|
||||||
}}
|
"aria-label": "select all tasks shown in the table",
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
{columns.map((col) => (
|
{columns.map((col) => (
|
||||||
<TableCell
|
<TableCell
|
||||||
@@ -363,12 +365,14 @@ function Row(props: RowProps) {
|
|||||||
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
onClick={() => history.push(taskDetailsPath(task.queue, task.id))}
|
||||||
>
|
>
|
||||||
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
<TableCell padding="checkbox" onClick={(e) => e.stopPropagation()}>
|
||||||
<Checkbox
|
<IconButton>
|
||||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
<Checkbox
|
||||||
props.onSelectChange(event.target.checked)
|
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||||
}
|
props.onSelectChange(event.target.checked)
|
||||||
checked={props.isSelected}
|
}
|
||||||
/>
|
checked={props.isSelected}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell component="th" scope="row">
|
<TableCell component="th" scope="row">
|
||||||
{uuidPrefix(task.id)}
|
{uuidPrefix(task.id)}
|
||||||
|
Reference in New Issue
Block a user