Skip to content

Commit

Permalink
refactor(category combo select): move into its own dedicated folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammer5 committed Aug 31, 2023
1 parent 196de49 commit c1c4755
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useRef, useState } from 'react'
import { SelectOption } from '../../types'
import { SearchableSingleSelect } from '../SearchableSingleSelect'
import { SelectOption } from '../../../types'
import { SearchableSingleSelect } from '../../SearchableSingleSelect'
import { useInitialOptionQuery } from './useInitialOptionQuery'
import { useOptionsQuery } from './useOptionsQuery'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { CategoryComboSelect } from './CategoryComboSelect'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CategoryCombo, GistCollectionResponse } from '../../types/generated'
import { CategoryCombo, GistCollectionResponse } from '../../../types/generated'

const filterFields = ['id', 'name'] as const //(name is translated by default in /gist)
export type FilteredCategoryCombo = Pick<
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useDataQuery } from '@dhis2/app-runtime'
import { SelectOption } from '../../types'
import { SelectOption } from '../../../types'
import { FilteredCategoryCombo } from './types'

type InitialCategoryComboQueryResult = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useMemo, useRef, useState } from 'react'
import { useModelGist } from '../../lib'
import { SelectOption } from '../../types'
import { useModelGist } from '../../../lib'
import { SelectOption } from '../../../types'
import { CategoryComboQueryResult } from './types'

export function useOptionsQuery({
Expand Down
2 changes: 1 addition & 1 deletion src/components/metadataSelects/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { CategoryComboSelect } from './CategoryComboSelect'
export * from './CategoryComboSelect'

0 comments on commit c1c4755

Please sign in to comment.