New: Newznab/Torznab categories dropdown with indexer provided category names

Signed-off-by: Robin Dadswell <robin@dadswell.email>
This commit is contained in:
Taloth
2020-10-08 23:33:13 +02:00
committed by nitsua
parent 5abfee1bf8
commit a0ef1ebaad
22 changed files with 428 additions and 35 deletions
@@ -2,13 +2,13 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { clearOptions, fetchOptions } from 'Store/Actions/providerOptionActions';
import { clearOptions, defaultState, fetchOptions } from 'Store/Actions/providerOptionActions';
import DeviceInput from './DeviceInput';
function createMapStateToProps() {
return createSelector(
(state, { value }) => value,
(state) => state.providerOptions,
(state) => state.providerOptions.devices || defaultState,
(value, devices) => {
return {
@@ -51,7 +51,7 @@ class DeviceInputConnector extends Component {
}
componentWillUnmount = () => {
this.props.dispatchClearOptions();
this.props.dispatchClearOptions({ section: 'devices' });
}
//
@@ -65,6 +65,7 @@ class DeviceInputConnector extends Component {
} = this.props;
dispatchFetchOptions({
section: 'devices',
action: 'getDevices',
provider,
providerData