Skip to content

Commit

Permalink
Fix arrowToggle (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
dremartins authored Feb 15, 2022
1 parent 5aa434e commit 6c1d1e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Precise UI Changelog

## 2.1.9

- Fixed `arrowToggle` on `AccordionTable`

## 2.1.8

- Fixed max height dropdown
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "precise-ui",
"version": "2.1.8",
"version": "2.1.9",
"description": "Precise UI React component library powered by Styled Components.",
"keywords": [
"react",
Expand Down
8 changes: 7 additions & 1 deletion src/components/AccordionTable/AccordionTableBasic.part.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,13 @@ export class AccordionTableBasic<T> extends React.Component<AccordionTableProps<
const { row, data } = e;

if (e.column === 0) {
return <StyledIcon isRotated={hasIndex(this.state.selectedIndex, row)} name="KeyboardArrowRight" />;
return (
<StyledIcon
isRotated={hasIndex(this.state.selectedIndex, row)}
name="KeyboardArrowRight"
onClick={() => data && this.props.arrowToggle && this.handleClick(row, data)}
/>
);
}

const { cellRenderer } = this.props;
Expand Down

0 comments on commit 6c1d1e6

Please sign in to comment.