Skip to content

Commit

Permalink
fix(CustomFileInput): include children in render
Browse files Browse the repository at this point in the history
  • Loading branch information
David Ellingsworth authored and David Ellingsworth committed Aug 22, 2019
1 parent 168b758 commit bacbddd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CustomFileInput.js
Expand Up @@ -85,7 +85,7 @@ class CustomFileInput extends React.Component {
),
cssModule
);

const validationClassNames = mapToCssModules(
classNames(
invalid && 'is-invalid',
Expand All @@ -101,6 +101,7 @@ class CustomFileInput extends React.Component {
<div className={customClass}>
<input type="file" {...attributes} ref={innerRef} className={classNames(validationClassNames, mapToCssModules('custom-file-input', cssModule))} onChange={this.onChange}/>
<label className={mapToCssModules('custom-file-label', cssModule)} htmlFor={labelHtmlFor}>{files || label || 'Choose file'}</label>
{children}
</div>
);
}
Expand Down

0 comments on commit bacbddd

Please sign in to comment.