mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 03:02:07 +03:00
- client: 2144 Fix DNS allowlists tab crash after opening "Choose blocklists" modal
Close #2144
Squashed commit of the following:
commit 435f17df9ce41e0f56b78cf8b7a390b73f16243b
Merge: 8899d65e 69a74071
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Fri Oct 2 13:02:36 2020 +0300
Merge branch 'master' into fix/2144
commit 8899d65e9cf320fa07561f1f5a35cd3424a49a32
Author: ArtemBaskal <a.baskal@adguard.com>
Date: Thu Oct 1 23:00:06 2020 +0300
- client: 2144 Fix DNS allowlists tab crash after opening "Choose blocklists" modal
This commit is contained in:
parent
69a740714f
commit
a7d2dd7bdb
@ -23,7 +23,7 @@ class DnsBlocklist extends Component {
|
||||
}
|
||||
|
||||
handleSubmit = (values, _, { initialValues }) => {
|
||||
const { filtering: { modalFilterUrl, modalType } } = this.props;
|
||||
const { modalFilterUrl, modalType } = this.props.filtering;
|
||||
|
||||
switch (modalType) {
|
||||
case MODAL_TYPE.EDIT_FILTERS:
|
||||
|
@ -8,6 +8,8 @@ import { validatePath, validateRequiredValue } from '../../helpers/validators';
|
||||
import { renderCheckboxField, renderInputField } from '../../helpers/form';
|
||||
import { MODAL_OPEN_TIMEOUT, MODAL_TYPE, FORM_NAME } from '../../helpers/constants';
|
||||
|
||||
const filtersCatalog = require('../../helpers/filters/filters.json');
|
||||
|
||||
const getIconsData = (homepage, source) => ([
|
||||
{
|
||||
iconName: 'dashboard',
|
||||
@ -82,7 +84,6 @@ const Form = (props) => {
|
||||
modalType,
|
||||
toggleFilteringModal,
|
||||
selectedSources,
|
||||
filtersCatalog,
|
||||
} = props;
|
||||
|
||||
const openModal = (modalType, timeout = MODAL_OPEN_TIMEOUT) => {
|
||||
@ -168,7 +169,6 @@ Form.propTypes = {
|
||||
whitelist: PropTypes.bool,
|
||||
modalType: PropTypes.string.isRequired,
|
||||
toggleFilteringModal: PropTypes.func.isRequired,
|
||||
filtersCatalog: PropTypes.object,
|
||||
selectedSources: PropTypes.object,
|
||||
};
|
||||
|
||||
|
@ -78,6 +78,7 @@ class Modal extends Component {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
const title = t(getTitle(modalType, whitelist));
|
||||
@ -99,7 +100,6 @@ class Modal extends Component {
|
||||
<Form
|
||||
selectedSources={selectedSources}
|
||||
initialValues={initialValues}
|
||||
filtersCatalog={filtersCatalog}
|
||||
modalType={modalType}
|
||||
onSubmit={handleSubmit}
|
||||
processingAddFilter={processingAddFilter}
|
||||
|
@ -56,6 +56,7 @@ const filtering = handleActions(
|
||||
...state,
|
||||
isModalOpen: !state.isModalOpen,
|
||||
isFilterAdded: false,
|
||||
modalType: '',
|
||||
};
|
||||
return newState;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user