Skip to content

Commit

Permalink
Bug/#363 on change double trigger (#364)
Browse files Browse the repository at this point in the history
* Removed onClick from expand row cell

* package-lock updated
  • Loading branch information
dremartins authored Feb 7, 2022
1 parent 8cfe932 commit 78acd98
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 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.7

- Fix `onChange` double trigger on clicking `AccordionTable` expand icon

## 2.1.6

- Fixed controlled mode on Pagination component
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "precise-ui",
"version": "2.1.6",
"version": "2.1.7",
"description": "Precise UI React component library powered by Styled Components.",
"keywords": [
"react",
Expand Down Expand Up @@ -125,4 +125,4 @@
"engines": {
"node": ">=10.0.0"
}
}
}
8 changes: 1 addition & 7 deletions src/components/AccordionTable/AccordionTableBasic.part.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,7 @@ 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"
onClick={() => data && this.handleClick(row, data)}
/>
);
return <StyledIcon isRotated={hasIndex(this.state.selectedIndex, row)} name="KeyboardArrowRight" />;
}

const { cellRenderer } = this.props;
Expand Down

0 comments on commit 78acd98

Please sign in to comment.