Skip to content

Commit

Permalink
Merge pull request #205 from kiwicom/textarea-value-fix
Browse files Browse the repository at this point in the history
Give a value to textarea via prop
  • Loading branch information
VaclavSir authored Jun 7, 2018
2 parents a41d563 + c9bbd62 commit 6864d0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/_deprecated/InputTextarea/InputTextarea.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Props = {
const InputTextarea = (props: Props) => (
<React.Fragment>
<Label label={props.label} valueEmpty={!!props.value}>
<textarea onChange={props.onChange}>{props.value}</textarea>
<textarea onChange={props.onChange} value={props.value} />
</Label>
<FieldFeedback error={props.error} help={props.help} />
<style jsx>{`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ exports[`Storyshots InputTextarea default 1`] = `
<textarea
className="jsx-1873754240"
onChange={[Function]}
>

</textarea>
value=""
/>
</label>
`;

Expand All @@ -29,9 +28,8 @@ exports[`Storyshots InputTextarea empty 1`] = `
<textarea
className="jsx-1873754240"
onChange={[Function]}
>

</textarea>
value=""
/>
</label>
`;

Expand All @@ -52,9 +50,8 @@ Array [
<textarea
className="jsx-3284876408"
onChange={[Function]}
>
input value
</textarea>
value="input value"
/>
</label>,
<span
className="jsx-3092314264"
Expand All @@ -80,10 +77,9 @@ exports[`Storyshots InputTextarea label 1`] = `
<textarea
className="jsx-1873754240"
onChange={[Function]}
>
First line,
value="First line,
second line,
third line...
</textarea>
third line..."
/>
</label>
`;

0 comments on commit 6864d0d

Please sign in to comment.