Skip to content

Commit

Permalink
fixed searchdropdown fields
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewplummer committed Nov 26, 2024
1 parent a45cab6 commit f40a201
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions services/web/src/components/form-fields/SearchDropdown.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import React from 'react';
import { Form } from 'semantic';
import { omit } from 'lodash';
import { pick, omit } from 'lodash';

import SearchDropdown from '../SearchDropdown';

const fieldTypes = Object.keys(Form.Field.propTypes);

export default class FormSearchDropdown extends React.Component {
render() {
const { label, required, ...props } = omit(
this.props,
Form.Field.propTypes
);
const { label, ...fieldProps } = pick(this.props, fieldTypes);
const dropdownProps = omit(this.props, fieldTypes);
return (
<Form.Field required={required}>
<Form.Field {...fieldProps}>
<label>{label}</label>
<SearchDropdown fluid {...props} />
<SearchDropdown fluid {...dropdownProps} />
</Form.Field>
);
}
Expand Down

0 comments on commit f40a201

Please sign in to comment.