* fix(#2569): market id copy update * fix: enable cell text selection on ag-grid by default * chore: fix partially filled order test Co-authored-by: Rado <szpiechrados@gmail.com>
This commit is contained in:
parent
5e97391d53
commit
c70ec7676e
@ -192,7 +192,7 @@ describe('subscribe orders', { tags: '@smoke' }, () => {
|
||||
'PartiallyFilled'
|
||||
);
|
||||
cy.getByTestId(`order-status-${orderId}`)
|
||||
.parent()
|
||||
.parentsUntil(`.ag-row`)
|
||||
.siblings(`[col-id=${orderRemaining}]`)
|
||||
.should('have.text', '4/5');
|
||||
});
|
||||
|
@ -96,23 +96,23 @@ const AccountHistoryManager = ({
|
||||
[pubKey]
|
||||
);
|
||||
|
||||
const { data: assetsWithBalanceHistory } = useDataProvider({
|
||||
const { data: accounts } = useDataProvider({
|
||||
dataProvider: accountsOnlyDataProvider,
|
||||
variables: variablesForOneTimeQuery,
|
||||
skip: !pubKey,
|
||||
});
|
||||
|
||||
const assetsWithBalance = useMemo(
|
||||
() => assetsWithBalanceHistory?.map((e) => e?.asset?.id) || [],
|
||||
[assetsWithBalanceHistory]
|
||||
const assetIds = useMemo(
|
||||
() => accounts?.map((e) => e?.asset?.id) || [],
|
||||
[accounts]
|
||||
);
|
||||
|
||||
const assets = useMemo(
|
||||
() =>
|
||||
assetData
|
||||
.filter((a) => assetsWithBalance.includes(a.id))
|
||||
.filter((a) => assetIds.includes(a.id))
|
||||
.sort((a, b) => a.name.localeCompare(b.name)),
|
||||
[assetData, assetsWithBalance]
|
||||
[assetData, assetIds]
|
||||
);
|
||||
const [asset, setAsset] = useState<AssetFieldsFragment>(assets[0]);
|
||||
const [range, setRange] = useState<typeof DateRange[keyof typeof DateRange]>(
|
||||
|
@ -66,7 +66,6 @@ export const LiquidityTable = forwardRef<AgGridReact, LiquidityTableProps>(
|
||||
tooltipComponent: TooltipCellComponent,
|
||||
sortable: true,
|
||||
}}
|
||||
enableCellTextSelection={true}
|
||||
rowData={data}
|
||||
>
|
||||
<AgGridColumn
|
||||
|
@ -48,6 +48,10 @@ export const MarketListTable = forwardRef<
|
||||
headerName={t('Market')}
|
||||
field="tradableInstrument.instrument.code"
|
||||
/>
|
||||
<AgGridColumn
|
||||
headerName={t('Description')}
|
||||
field="tradableInstrument.instrument.name"
|
||||
/>
|
||||
<AgGridColumn
|
||||
headerName={t('Settlement asset')}
|
||||
field="tradableInstrument.instrument.product.settlementAsset"
|
||||
@ -161,7 +165,7 @@ export const MarketListTable = forwardRef<
|
||||
: addDecimalsFormatNumber(data.data.markPrice, data.decimalPlaces)
|
||||
}
|
||||
/>
|
||||
<AgGridColumn headerName={t('Description')} field="name" />
|
||||
<AgGridColumn headerName={t('Market ID')} field="id" />
|
||||
</AgGrid>
|
||||
);
|
||||
});
|
||||
|
@ -33,7 +33,11 @@ export const AgGridThemed = ({
|
||||
customThemeParams?: string;
|
||||
}) => {
|
||||
const { theme } = useThemeSwitcher();
|
||||
const defaultProps = { rowHeight: 22, headerHeight: 22 };
|
||||
const defaultProps = {
|
||||
rowHeight: 22,
|
||||
headerHeight: 22,
|
||||
enableCellTextSelection: true,
|
||||
};
|
||||
return (
|
||||
<div
|
||||
className={`${className ?? ''} ${
|
||||
|
@ -33,11 +33,11 @@ export const AgGridThemed = React.forwardRef<
|
||||
>
|
||||
{theme === 'dark' ? (
|
||||
<AgGridDarkTheme>
|
||||
<AgGridReact {...props} ref={ref} />
|
||||
<AgGridReact {...props} ref={ref} enableCellTextSelection={true} />
|
||||
</AgGridDarkTheme>
|
||||
) : (
|
||||
<AgGridLightTheme>
|
||||
<AgGridReact {...props} ref={ref} />
|
||||
<AgGridReact {...props} ref={ref} enableCellTextSelection={true} />
|
||||
</AgGridLightTheme>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user