fix: refactoring account form fields with FastField component.

This commit is contained in:
Ahmed Bouhuolia
2020-11-29 20:22:02 +02:00
parent 62bfc1fc5c
commit cfeca92a60
5 changed files with 306 additions and 317 deletions

View File

@@ -1,5 +1,7 @@
import React, { useCallback } from 'react';
import classNames from 'classnames';
import { ListSelect } from 'components';
import { CLASSES } from 'common/classes';
export default function AccountsTypesSelect({
accountsTypes,
@@ -7,6 +9,7 @@ export default function AccountsTypesSelect({
defaultSelectText = 'Select account type',
onTypeSelected,
disabled = false,
popoverFill = false,
...restProps
}) {
// Filters accounts types items.
@@ -41,6 +44,9 @@ export default function AccountsTypesSelect({
onItemSelect={handleItemSelected}
itemPredicate={filterAccountTypeItems}
disabled={disabled}
className={classNames('form-group--select-list', {
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
{...restProps}
/>
);