Make scenes page list view checkbox fill entire cell (#2974)

This commit is contained in:
7dJx1qP 2022-10-05 22:08:43 -04:00 committed by GitHub
parent 9083796a42
commit 83359b00d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 19 deletions

View File

@ -55,24 +55,26 @@ export const SceneListTable: React.FC<ISceneListTableProps> = (
return (
<tr key={scene.id}>
<td>
<Form.Control
type="checkbox"
checked={props.selectedIds.has(scene.id)}
onChange={() =>
props.onSelectChange!(
scene.id,
!props.selectedIds.has(scene.id),
shiftKey
)
}
onClick={(
event: React.MouseEvent<HTMLInputElement, MouseEvent>
) => {
// eslint-disable-next-line prefer-destructuring
shiftKey = event.shiftKey;
event.stopPropagation();
}}
/>
<label>
<Form.Control
type="checkbox"
checked={props.selectedIds.has(scene.id)}
onChange={() =>
props.onSelectChange!(
scene.id,
!props.selectedIds.has(scene.id),
shiftKey
)
}
onClick={(
event: React.MouseEvent<HTMLInputElement, MouseEvent>
) => {
// eslint-disable-next-line prefer-destructuring
shiftKey = event.shiftKey;
event.stopPropagation();
}}
/>
</label>
</td>
<td>
<Link to={sceneLink}>
@ -114,7 +116,7 @@ export const SceneListTable: React.FC<ISceneListTableProps> = (
};
return (
<div className="row table-list justify-content-center">
<div className="row scene-table table-list justify-content-center">
<Table striped bordered>
<thead>
<tr>

View File

@ -638,3 +638,23 @@ input[type="range"].blue-slider {
margin-bottom: 0;
}
}
.scene-table {
table,
tr,
td,
label,
input {
height: 100%;
}
td {
padding: 0;
}
label {
display: block;
margin: 0;
padding: 0.5rem;
}
}