mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-14 11:26:24 +00:00
Fix non interactive book controls
This commit is contained in:
parent
74364fd522
commit
19796c7c50
@ -148,7 +148,7 @@ const BookControl = ({
|
||||
</Grid>
|
||||
) : null}
|
||||
|
||||
{width > mediumToolbarWidth && window.NativeRobosats === undefined ? (
|
||||
{width > mediumToolbarWidth ? (
|
||||
<Grid item>
|
||||
<AutocompletePayments
|
||||
sx={{
|
||||
@ -176,9 +176,7 @@ const BookControl = ({
|
||||
</Grid>
|
||||
) : null}
|
||||
|
||||
{/* Native Android app must always show the Select, as the on display keyboard does not play well with the book table component */}
|
||||
{(width > smallestToolbarWidth && width < mediumToolbarWidth) ||
|
||||
window.NativeRobosats != undefined ? (
|
||||
{width > smallestToolbarWidth && width < mediumToolbarWidth ? (
|
||||
<Grid item>
|
||||
<Select
|
||||
sx={{
|
||||
|
@ -694,20 +694,6 @@ const BookTable = ({
|
||||
);
|
||||
};
|
||||
|
||||
const Controls = function () {
|
||||
return (
|
||||
<BookControl
|
||||
width={width}
|
||||
type={fav.type}
|
||||
currency={fav.currency}
|
||||
onCurrencyChange={onCurrencyChange}
|
||||
onTypeChange={onTypeChange}
|
||||
paymentMethod={paymentMethods}
|
||||
setPaymentMethods={setPaymentMethods}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
const gridComponents = function () {
|
||||
const components: GridComponentProps = {
|
||||
LoadingOverlay: LinearProgress,
|
||||
@ -721,7 +707,7 @@ const BookTable = ({
|
||||
components.Footer = Footer;
|
||||
}
|
||||
if (showControls) {
|
||||
components.Toolbar = Controls;
|
||||
components.Toolbar = BookControl;
|
||||
}
|
||||
return components;
|
||||
};
|
||||
@ -753,6 +739,17 @@ const BookTable = ({
|
||||
columns={columns}
|
||||
hideFooter={!showFooter}
|
||||
components={gridComponents()}
|
||||
componentsProps={{
|
||||
toolbar: {
|
||||
width,
|
||||
type: fav.type,
|
||||
currency: fav.currency,
|
||||
onCurrencyChange,
|
||||
onTypeChange,
|
||||
paymentMethod: paymentMethods,
|
||||
setPaymentMethods,
|
||||
},
|
||||
}}
|
||||
pageSize={book.loading && book.orders.length == 0 ? 0 : pageSize}
|
||||
rowsPerPageOptions={width < 22 ? [] : [0, pageSize, defaultPageSize * 2, 50, 100]}
|
||||
onPageSizeChange={(newPageSize) => {
|
||||
|
Loading…
Reference in New Issue
Block a user