mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-27 07:38:11 +08:00
move logic out of reducer into middleware
This commit is contained in:
@@ -18,8 +18,13 @@ class Expression extends React.Component {
|
||||
|
||||
};
|
||||
}
|
||||
handleClick() {
|
||||
|
||||
handleClick(gene) {
|
||||
return () => {
|
||||
this.props.dispatch({
|
||||
type: "color by expression",
|
||||
gene: gene,
|
||||
});
|
||||
}
|
||||
}
|
||||
render () {
|
||||
if (!this.props.expression) return null
|
||||
@@ -31,7 +36,7 @@ class Expression extends React.Component {
|
||||
return (
|
||||
<button
|
||||
key={gene}
|
||||
onClick={this.handleClick.bind(this)}
|
||||
onClick={this.handleClick(gene).bind(this)}
|
||||
style={{marginRight: 10}}>
|
||||
{gene}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user