Skip to content

Commit

Permalink
improve url performance to select from fields
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Oct 26, 2024
1 parent 743922f commit 2a86aa7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/common/components/configurationForm/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ const hdTypeOptions = () => [
}
]

const filterFormParams = (params = {}) =>
Object.keys(params).reduce((arr, key) => {
if (FORM_FIELDS.includes(key)) {
const filterFormParams = (params = {}) => {
const paramKeys = Object.keys(params)
return FORM_FIELDS.reduce((arr, key) => {
if (paramKeys.includes(key)) {
arr[key] = params[key]
}
return arr
}, {})
}

const ConfigurationForm = () => {
const dispatch = useDispatch()
Expand Down

0 comments on commit 2a86aa7

Please sign in to comment.