refactor(webapp): Accounts Select and MultiSelect components

This commit is contained in:
a.bouhuolia
2023-04-30 17:33:15 +02:00
parent 83510cfa70
commit 6f0f47f38a
13 changed files with 341 additions and 481 deletions

View File

@@ -45,13 +45,6 @@ const currencyItemRenderer = (currency, { handleClick, modifiers, query }) => {
);
};
const currencySelectProps = {
itemPredicate: currencyItemPredicate,
itemRenderer: currencyItemRenderer,
valueAccessor: 'currency_code',
labelAccessor: 'currency_code',
};
/**
*
* @param {*} currencies
@@ -60,7 +53,10 @@ const currencySelectProps = {
export function CurrencySelect({ currencies, ...rest }) {
return (
<FSelect
{...currencySelectProps}
itemPredicate={currencyItemPredicate}
itemRenderer={currencyItemRenderer}
valueAccessor={'currency_code'}
labelAccessor={'currency_code'}
{...rest}
items={currencies}
input={CurrnecySelectButton}