mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
Fix disabled button with AccountSelect
This commit is contained in:
@@ -15,7 +15,7 @@ export default function ListSelect({
|
||||
|
||||
initialSelectedItem,
|
||||
onItemSelect,
|
||||
|
||||
disabled = false,
|
||||
...selectProps
|
||||
}) {
|
||||
const selectedItemObj = useMemo(
|
||||
@@ -24,7 +24,10 @@ export default function ListSelect({
|
||||
);
|
||||
|
||||
const selectedInitialItem = useMemo(
|
||||
() => selectProps.items.find((i) => i[selectedItemProp] === initialSelectedItem),
|
||||
() =>
|
||||
selectProps.items.find(
|
||||
(i) => i[selectedItemProp] === initialSelectedItem,
|
||||
),
|
||||
[initialSelectedItem],
|
||||
);
|
||||
|
||||
@@ -65,10 +68,12 @@ export default function ListSelect({
|
||||
onItemSelect={handleItemSelect}
|
||||
{...selectProps}
|
||||
noResults={noResults}
|
||||
disabled={disabled}
|
||||
>
|
||||
<Button
|
||||
text={currentItem ? currentItem[labelProp] : defaultText}
|
||||
loading={isLoading}
|
||||
disabled={disabled}
|
||||
{...buttonProps}
|
||||
/>
|
||||
</Select>
|
||||
|
||||
Reference in New Issue
Block a user