1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-22 22:16:13 -04:00

More file browsing improvements

This commit is contained in:
Mark McDowall
2019-04-05 20:16:57 -07:00
parent 5b2d0a2ade
commit a63ca0f0e9
3 changed files with 44 additions and 18 deletions
@@ -28,8 +28,8 @@ function createMapStateToProps() {
}
const mapDispatchToProps = {
fetchPaths,
clearPaths
dispatchFetchPaths: fetchPaths,
dispatchClearPaths: clearPaths
};
class PathInputConnector extends Component {
@@ -38,14 +38,19 @@ class PathInputConnector extends Component {
// Listeners
onFetchPaths = (path) => {
this.props.fetchPaths({
const {
includeFiles,
dispatchFetchPaths
} = this.props;
dispatchFetchPaths({
path,
includeFiles: this.props.includeFiles
includeFiles
});
}
onClearPaths = () => {
this.props.clearPaths();
this.props.dispatchClearPaths();
}
//
@@ -64,8 +69,8 @@ class PathInputConnector extends Component {
PathInputConnector.propTypes = {
includeFiles: PropTypes.bool.isRequired,
fetchPaths: PropTypes.func.isRequired,
clearPaths: PropTypes.func.isRequired
dispatchFetchPaths: PropTypes.func.isRequired,
dispatchClearPaths: PropTypes.func.isRequired
};
PathInputConnector.defaultProps = {