mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Fixed: Custom Filter improvements
This commit is contained in:
parent
895abe8c3b
commit
a3e312b368
@ -3,16 +3,21 @@ import { connect } from 'react-redux';
|
|||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import sortByName from 'Utilities/Array/sortByName';
|
import sortByName from 'Utilities/Array/sortByName';
|
||||||
import { filterBuilderTypes } from 'Helpers/Props';
|
import { filterBuilderTypes } from 'Helpers/Props';
|
||||||
|
import * as filterTypes from 'Helpers/Props/filterTypes';
|
||||||
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
||||||
|
|
||||||
function createTagListSelector() {
|
function createTagListSelector() {
|
||||||
return createSelector(
|
return createSelector(
|
||||||
|
(state, { filterType }) => filterType,
|
||||||
(state, { sectionItems }) => sectionItems,
|
(state, { sectionItems }) => sectionItems,
|
||||||
(state, { selectedFilterBuilderProp }) => selectedFilterBuilderProp,
|
(state, { selectedFilterBuilderProp }) => selectedFilterBuilderProp,
|
||||||
(sectionItems, selectedFilterBuilderProp) => {
|
(filterType, sectionItems, selectedFilterBuilderProp) => {
|
||||||
if (
|
if (
|
||||||
selectedFilterBuilderProp.type === filterBuilderTypes.NUMBER ||
|
(selectedFilterBuilderProp.type === filterBuilderTypes.NUMBER ||
|
||||||
selectedFilterBuilderProp.type === filterBuilderTypes.STRING
|
selectedFilterBuilderProp.type === filterBuilderTypes.STRING) &&
|
||||||
|
filterType !== filterTypes.EQUAL &&
|
||||||
|
filterType !== filterBuilderTypes.NOT_EQUAL ||
|
||||||
|
!selectedFilterBuilderProp.optionsSelector
|
||||||
) {
|
) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
.tag {
|
.tag {
|
||||||
|
height: 21px;
|
||||||
|
|
||||||
&.isLastTag {
|
&.isLastTag {
|
||||||
.or {
|
.or {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -29,10 +29,10 @@ function CustomFiltersModalContent(props) {
|
|||||||
|
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
{
|
{
|
||||||
customFilters.map((customFilter, index) => {
|
customFilters.map((customFilter) => {
|
||||||
return (
|
return (
|
||||||
<CustomFilter
|
<CustomFilter
|
||||||
key={index}
|
key={customFilter.id}
|
||||||
id={customFilter.id}
|
id={customFilter.id}
|
||||||
label={customFilter.label}
|
label={customFilter.label}
|
||||||
filters={customFilter.filters}
|
filters={customFilter.filters}
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
.suggestionsList {
|
.suggestionsList {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
max-height: 200px;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,10 +14,11 @@
|
|||||||
|
|
||||||
.internalInput {
|
.internalInput {
|
||||||
flex: 1 1 0%;
|
flex: 1 1 0%;
|
||||||
|
margin-top: -6px;
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
min-width: 20%;
|
min-width: 20%;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
width: 0%;
|
width: 0%;
|
||||||
height: 21px;
|
height: 31px;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding: 6px 16px;
|
padding: 6px 16px;
|
||||||
|
height: 33px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user