Skip to content

Commit

Permalink
fix: rename type
Browse files Browse the repository at this point in the history
  • Loading branch information
hegeaal committed Oct 19, 2023
1 parent d6286b2 commit 1c27929
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/filter-box/filter-box.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import localization from '../../lib/localization';
import { FilterOption } from '../filter-option/filter-option.component';
import './filter-box.scss';

import { FilterSearchOption } from '../../types';
import { SelectOption } from '../../types';

interface Props {
htmlKey?: number;
Expand Down Expand Up @@ -197,7 +197,7 @@ export class FilterBox extends React.Component<Props, State> {
label: label || localization.facet.formatType.UNKNOWN
};
})
.sort((a: FilterSearchOption, b: FilterSearchOption) =>
.sort((a: SelectOption, b: SelectOption) =>
a.label.localeCompare(b.label)
);

Expand Down
6 changes: 3 additions & 3 deletions src/pages/search-page/filter-tree/filter-tree.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import localization from '../../../lib/localization';
import { getTranslateText } from '../../../lib/translateText';
import './filter-tree.scss';

import type { FilterSearchOption } from '../../../types';
import type { SelectOption } from '../../../types';
import type { FilterChange } from '../../../components/filter-box/filter-box.component';
import TreeView from '../../../components/treeview';

Expand Down Expand Up @@ -271,13 +271,13 @@ export const FilterTree: FC<Props> = ({
label: `${getNameFromNode(node, referenceDataItems)}`
});

const mapNodeToFilterSearchOptions = (node: any): FilterSearchOption[] =>
const mapNodeToFilterSearchOptions = (node: any): SelectOption[] =>
node.children
? [
getFilterSearchOption(node),
...(node.children.flatMap(
mapNodeToFilterSearchOptions
) as FilterSearchOption[])
) as SelectOption[])
]
: [getFilterSearchOption(node)];

Expand Down
2 changes: 1 addition & 1 deletion src/types/domain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ export interface CommentThread {
timestamp: string;
content: string;
}
export interface FilterSearchOption {
export interface SelectOption {
value: string;
label: string;
}
Expand Down

0 comments on commit 1c27929

Please sign in to comment.