Skip to content

Commit 47709f7

Browse files
Krzysztof Błażełekrcdexta
authored andcommitted
Fix CustomNewCardForm story
1 parent 8fbde5c commit 47709f7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stories/CustomNewCardForm.story.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ import Board from '../src'
66
const data = require('./data/base.json')
77

88
class NewCardForm extends Component {
9+
handleAdd = () => this.props.onAdd({title: this.titleRef.value, description: this.descRef.value})
10+
setTitleRef = (ref) => this.titleRef = ref
11+
setDescRef = (ref) => this.descRef = ref
912
render() {
1013
const {onCancel} = this.props
11-
const handleAdd = () => this.props.onAdd({title: this.titleRef.value, desc: this.descRef.value})
12-
const setTitleRef = (ref) => this.titleRef = ref
13-
const setDescRef = (ref) => this.descRef = ref
1414
return (
1515
<div style={{background: 'white', borderRadius: 3, border: '1px solid #eee', borderBottom: '1px solid #ccc'}}>
1616
<div style={{padding: 5, margin: 5}}>
1717
<div>
1818
<div style={{marginBottom: 5}}>
19-
<input type="text" ref={setTitleRef} placeholder="Title" />
19+
<input type="text" ref={this.setTitleRef} placeholder="Title" />
2020
</div>
2121
<div style={{marginBottom: 5}}>
22-
<input type="text" ref={setDescRef} placeholder="Description" />
22+
<input type="text" ref={this.setDescRef} placeholder="Description" />
2323
</div>
2424
</div>
2525
<button onClick={this.handleAdd}>Add</button>

0 commit comments

Comments
 (0)