Skip to content

Commit

Permalink
fix: enum2options label key
Browse files Browse the repository at this point in the history
  • Loading branch information
xunge0613 committed Jun 11, 2020
1 parent 6f1860a commit 569e8c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/select/enum2options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function enum2Options(enumObj: object, labelName: string = 'label', valueName: s
return (Object.keys(enumObj)
.filter(key => isNaN(Number(key))) || [])
.map(key => ({
[labelName]: enumObj[key],
[valueName]: key
[labelName]: key,
[valueName]: enumObj[key]
}))
}

Expand Down

0 comments on commit 569e8c5

Please sign in to comment.