Skip to content

Commit

Permalink
fix prettier / ts issues
Browse files Browse the repository at this point in the history
  • Loading branch information
snide committed Jan 20, 2021
1 parent 10e2ac4 commit 60f9bd1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
42 changes: 22 additions & 20 deletions src/components/datagrid/_data_grid_data_row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
min-width: 100%; // Needed to prevent wraps. Inline flex is tricky
}

@keyframes euiDataGridCellButtonSlideIn {
from {
margin-left: 0;
width: 0;
}

to {
margin-left: $euiDataGridCellPaddingM;
width: $euiSizeM;
}
}

@include euiDataGridRowCell {
@include euiFontSizeS;

Expand Down Expand Up @@ -50,23 +38,24 @@
// Long delays on hover to mitigate the accordion effect
&:hover {
.euiDataGridRowCell__expandButtonIcon {
animation-duration: $euiAnimSpeedFast;
animation-duration: $euiAnimSpeedExtraFast;
animation-name: euiDataGridCellButtonSlideIn;
animation-iteration-count: 1;
animation-delay: 1000ms;
animation-fill-mode: forwards;
animation-delay: $euiAnimSpeedNormal;
animation-fill-mode: forwards;
}

.euiDataGridRowCell__actionButtonIcon {
animation-duration: $euiAnimSpeedFast;
animation-duration: $euiAnimSpeedExtraFast;
animation-name: euiDataGridCellButtonSlideIn;
animation-iteration-count: 1;
animation-delay: 1000ms;
animation-fill-mode: forwards;
animation-delay: $euiAnimSpeedNormal;
animation-fill-mode: forwards;
}
}

&:not(:hover), &.euiDataGridRowCell--open {
&:not(:hover),
&.euiDataGridRowCell--open {
.euiDataGridRowCell__expandButtonIcon {
animation: none;
margin-left: $euiDataGridCellPaddingM;
Expand All @@ -90,7 +79,8 @@

// if a cell is not hovered nor focused nor open via popover, don't show buttons in general
&:not(:hover):not(:focus):not(.euiDataGridRowCell--open) {
.euiDataGridRowCell__expandButtonIcon, .euiDataGridRowCell__actionButtonIcon {
.euiDataGridRowCell__expandButtonIcon,
.euiDataGridRowCell__actionButtonIcon {
display: none;
}
}
Expand Down Expand Up @@ -257,3 +247,15 @@
}
}
}

@keyframes euiDataGridCellButtonSlideIn {
from {
margin-left: 0;
width: 0;
}

to {
margin-left: $euiDataGridCellPaddingM;
width: $euiSizeM;
}
}
1 change: 0 additions & 1 deletion src/components/datagrid/data_grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,6 @@ export const EuiDataGrid: FunctionComponent<EuiDataGridProps> = (props) => {
const [interactiveCellId] = useState(htmlIdGenerator()());
const [headerIsInteractive, setHeaderIsInteractive] = useState(false);


const cellsUpdateFocus = useRef<Map<string, Function>>(new Map());

const [wrappingDivFocusProps, focusedCell, setFocusedCell] = useFocus(
Expand Down
2 changes: 1 addition & 1 deletion src/components/datagrid/data_grid_body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ export const EuiDataGridBody: FunctionComponent<EuiDataGridBodyProps> = (
) {
setWidth(boundingRect.width);
}
}, [unconstrainedHeight, wrapperDimensions]);
}, [unconstrainedHeight, wrapperDimensions, height, width]);

const preventTabbing = useCallback(() => {
if (wrapperRef.current) {
Expand Down
3 changes: 2 additions & 1 deletion src/components/datagrid/data_grid_cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ export class EuiDataGridCell extends Component<
return true;
if (nextState.isEntered !== this.state.isEntered) return true;
if (nextState.isFocused !== this.state.isFocused) return true;
if (nextState.enableInteractions !== this.state.enableInteractions) return true;
if (nextState.enableInteractions !== this.state.enableInteractions)
return true;
if (nextState.disableCellTabIndex !== this.state.disableCellTabIndex)
return true;

Expand Down

0 comments on commit 60f9bd1

Please sign in to comment.