Renamed FilterType -> ComponentFilterType
Brian Vaughn committed
May 1, 2019 at 14:01 UTC
e6da4b9058987611018e64309225c38566516dff
2 files changed
+7
-4
src/devtools/views/Components/ComponentFiltersModal.js
+6
-3
@@ -33,9 +33,9 @@ import styles from './ComponentFiltersModal.css';
33
34
import type {
35
ComponentFilter,
36
+ ComponentFilterType,
37
ElementType,
38
ElementTypeComponentFilter,
38
- FilterType,
39
RegExpComponentFilter,
40
} from 'src/types';
41
@@ -159,7 +159,10 @@ function ComponentFiltersModal({ store, setIsModalShowing }: Props) {
159
onChange={({ currentTarget }) =>
160
changeFilterType(
161
componentFilter,
162
- ((parseInt(currentTarget.value, 10): any): FilterType)
162
+ ((parseInt(
163
+ currentTarget.value,
164
+ 10
165
+ ): any): ComponentFilterType)
166
)
167
}
168
>
@@ -282,7 +285,7 @@ function useComponentFilters() {
285
}, []);
286
287
const changeFilterType = useCallback(
285
- (componentFilter: ComponentFilter, type: FilterType) => {
288
+ (componentFilter: ComponentFilter, type: ComponentFilterType) => {
289
setComponentFilters(componentFilters => {
290
const cloned: Array<ComponentFilter> = [...componentFilters];
291
const index = componentFilters.indexOf(componentFilter);
src/types.js
+1
-1
@@ -42,7 +42,7 @@ export const ComponentFilterElementType = 1;
42
export const ComponentFilterDisplayName = 2;
43
export const ComponentFilterLocation = 3;
44
45
-export type FilterType = 1 | 2 | 3;
45
+export type ComponentFilterType = 1 | 2 | 3;
46
47
// Hide all elements of types in this Set.
48
// We hide host components only by default.