Merge pull request #1770 from RoboSats/display-all-payment-methods

Display all payment methods
This commit is contained in:
KoalaSat 2025-02-22 11:08:28 +00:00 committed by GitHub
commit 4cc7430aae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions

View File

@ -323,7 +323,6 @@ const AutocompletePayments: React.FC<AutocompletePaymentsProps> = (props) => {
}, },
}); });
const fewerOptions = groupedOptions.length > 8 ? groupedOptions.slice(0, 8) : groupedOptions;
const theme = useTheme(); const theme = useTheme();
const iconSize = 1.5 * theme.typography.fontSize; const iconSize = 1.5 * theme.typography.fontSize;
@ -364,7 +363,7 @@ const AutocompletePayments: React.FC<AutocompletePaymentsProps> = (props) => {
<div {...getRootProps()}> <div {...getRootProps()}>
<Fade <Fade
appear={false} appear={false}
in={fewerOptions.length === 0 && value.length === 0 && val.length === 0} in={groupedOptions.length === 0 && value.length === 0 && val.length === 0}
> >
<div style={{ height: 0, display: 'flex', alignItems: 'flex-start' }}> <div style={{ height: 0, display: 'flex', alignItems: 'flex-start' }}>
<Label <Label
@ -439,7 +438,7 @@ const AutocompletePayments: React.FC<AutocompletePaymentsProps> = (props) => {
</InputWrapper> </InputWrapper>
</div> </div>
</Tooltip> </Tooltip>
<Grow in={fewerOptions.length > 0}> <Grow in={groupedOptions.length > 0}>
<Listbox sx={props.listBoxProps?.sx ?? undefined} {...getListboxProps()}> <Listbox sx={props.listBoxProps?.sx ?? undefined} {...getListboxProps()}>
{props.listHeaderText ? ( {props.listHeaderText ? (
<div <div
@ -455,7 +454,7 @@ const AutocompletePayments: React.FC<AutocompletePaymentsProps> = (props) => {
</ListHeader> </ListHeader>
</div> </div>
) : null} ) : null}
{fewerOptions.map((option, index) => ( {groupedOptions.map((option, index) => (
<li key={option.name} {...getOptionProps({ option, index })}> <li key={option.name} {...getOptionProps({ option, index })}>
<Button <Button
fullWidth={true} fullWidth={true}
@ -493,8 +492,8 @@ const AutocompletePayments: React.FC<AutocompletePaymentsProps> = (props) => {
</Listbox> </Listbox>
</Grow> </Grow>
{/* Here goes what happens if there is no fewerOptions */} {/* Here goes what happens if there is no groupedOptions */}
<Grow in={getInputProps().value.length > 0 && !props.isFilter && fewerOptions.length === 0}> <Grow in={getInputProps().value.length > 0 && !props.isFilter && groupedOptions.length === 0}>
<Listbox {...getListboxProps()}> <Listbox {...getListboxProps()}>
<Button <Button
fullWidth={true} fullWidth={true}