Skip to content

Commit

Permalink
zd - Update SortableTable story with onClick example
Browse files Browse the repository at this point in the history
  • Loading branch information
zldavis committed Feb 26, 2018
1 parent 610729a commit aea4545
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stories/SortableTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class StatefulExample extends React.Component {
}
};

rowOnClick = (row) => {
alert(`clicked ${row.key}`);
};

render() {
const { ascending, column } = this.state;
const { bordered, hover, size, striped } = this.props;
Expand Down Expand Up @@ -96,6 +100,7 @@ class StatefulExample extends React.Component {
]}
rows={this.sortedData(column, ascending)}
rowExpanded={row => row.expanded && <div className="py-1"><Button color="danger" size="sm">Delete</Button></div>}
rowOnClick={this.rowOnClick}
/>
);
}
Expand Down Expand Up @@ -245,7 +250,7 @@ class StatefulExample extends React.Component {
/>
);
}
}
}
`}
</pre>
</Card>
Expand Down

0 comments on commit aea4545

Please sign in to comment.