Skip to content

Commit

Permalink
some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenjwatkins committed Aug 30, 2023
1 parent bf73e30 commit 5b7115b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions easy-ui-react/src/DataGrid/DataGrid.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@

width: 24px;
height: 24px;
margin: -4px;

cursor: pointer;

Expand Down Expand Up @@ -224,18 +225,18 @@
}
.cell:nth-child(2) {
position: sticky;
left: 48px;
left: 44px;
z-index: 2;
}
.columnHeader:nth-child(2) {
left: 48px;
left: 44px;
z-index: 4;
}
.columnHeader,
.cell {
&:first-child {
padding-left: design-token("space.2");
padding-right: design-token("space.1");
padding-right: design-token("space.1.5");
}
& + * {
padding-left: 0;
Expand Down
2 changes: 2 additions & 0 deletions easy-ui-react/src/DataGrid/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type RowProps<T = object> = {

export function Row({ item, children, state }: RowProps) {
const isSelected = state.selectionManager.isSelected(item.key);
const isDisabled = state.disabledKeys.has(item.key);
const isExpanded = item.value
? item.value[EXPAND_ROW_COLUMN_KEY as keyof typeof item.value] === true
: false;
Expand All @@ -31,6 +32,7 @@ export function Row({ item, children, state }: RowProps) {
isFocusVisible && styles.rowFocused,
isSelected && styles.rowSelected,
isPressed && styles.rowPressed,
isDisabled && styles.rowDisabled,
);

return (
Expand Down
2 changes: 1 addition & 1 deletion easy-ui-react/src/DataGrid/SelectAllColumnHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function SelectAllColumnHeader({
{state.selectionManager.selectionMode === "single" ? (
<VisuallyHidden>{checkboxProps["aria-label"]}</VisuallyHidden>
) : (
<Checkbox size="lg" {...checkboxProps} />
<Checkbox {...checkboxProps} />
)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion easy-ui-react/src/DataGrid/SelectCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function SelectCell({ cell, state }: SelectCellProps) {
);
return (
<div {...gridCellProps} ref={ref} className={styles.cell}>
<Checkbox size="lg" {...checkboxProps} />
<Checkbox {...checkboxProps} />
</div>
);
}

0 comments on commit 5b7115b

Please sign in to comment.