Skip to content

Commit

Permalink
fix(types): fix wrong types
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed Nov 21, 2023
1 parent b3d0899 commit 983c653
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
4 changes: 2 additions & 2 deletions src/components/ColorAndIconPicker/IconPickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export function IconPickerModal({
dense
placeholder={i18n.t('Search icons')}
value={searchValue}
onChange={({ value }: { value: string }) =>
setSearchValue(value)
onChange={({ value }) =>
setSearchValue(value || '')
}
/>
</div>
Expand Down
27 changes: 8 additions & 19 deletions src/pages/dataElements/form/customFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ButtonStrip,
Button,
Field,
Radio,
RadioFieldFF,
SingleSelectFieldFF,
} from '@dhis2/ui'
import React, { useRef } from 'react'
Expand Down Expand Up @@ -81,28 +81,17 @@ export function DomainField() {
validationText={error}
>
<div>
<Radio
{...aggregateInput.input}
<RadioFieldFF
className={classes.domainTypeRadioButton}
label={DOMAIN_TYPE.AGGREGATE}
onChange={(
_: object,
e: React.ChangeEvent<HTMLInputElement>
) => {
aggregateInput.input.onChange(e)
}}
input={aggregateInput.input}
meta={aggregateInput.meta}
/>

<Radio
{...trackerInput.input}
label={DOMAIN_TYPE.TRACKER}
<RadioFieldFF
className={classes.domainTypeRadioButton}
onChange={(
_: object,
e: React.ChangeEvent<HTMLInputElement>
) => {
trackerInput.input.onChange(e)
}}
label={DOMAIN_TYPE.TRACKER}
input={trackerInput.input}
meta={trackerInput.meta}
/>
</div>
</Field>
Expand Down

0 comments on commit 983c653

Please sign in to comment.