Skip to content

Commit

Permalink
Fix options-liste og bestilling-soek
Browse files Browse the repository at this point in the history
  • Loading branch information
betsytraran committed Jan 11, 2024
1 parent f200518 commit 15a13ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export const sokSelector = (bestillingerById, searchStr) => {
if (!searchStr || !items) return items

return items.filter(({ listedata }) => {
const searchValues = listedata.filter((v) => !_.isNil(v)).map((v) => v.toString().toLowerCase())
const searchValues = listedata
?.filter((v) => !_.isNil(v))
.map((v) => v.toString().toLowerCase())
return searchValues.some((v) => v.includes(searchStr.toLowerCase()))
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default function BestillingListe({
<DollyTable
pagination
gruppeDetaljer={{
antallElementer: gruppeInfo.antallBestillinger,
antallElementer: gruppeInfo?.antallBestillinger,
pageSize: sideStoerrelse,
}}
data={statusBestillinger}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const SelectOptionsFormat = {
)
return options
} else if (type === 'arbeidsforholdstyper') {
const options = kodeverk || []
const options = kodeverk?.koder || kodeverk || []
options?.length > 0 &&
options.forEach((option: Option) => {
if (option.value === 'frilanserOppdragstakerHonorarPersonerMm') {
Expand Down

0 comments on commit 15a13ee

Please sign in to comment.