fix(trading): positions and markets settlement asset column filter and sort (#3873)
This commit is contained in:
parent
145539e0c0
commit
67643afd74
@ -84,15 +84,17 @@ export const MarketsTable = ({ data }: MarketsTableProps) => {
|
|||||||
<AgGridColumn
|
<AgGridColumn
|
||||||
colId="asset"
|
colId="asset"
|
||||||
headerName={t('Settlement asset')}
|
headerName={t('Settlement asset')}
|
||||||
field="tradableInstrument.instrument.product.settlementAsset"
|
field="tradableInstrument.instrument.product.settlementAsset.symbol"
|
||||||
hide={window.innerWidth <= BREAKPOINT_MD}
|
hide={window.innerWidth <= BREAKPOINT_MD}
|
||||||
cellRenderer={({
|
cellRenderer={({
|
||||||
value,
|
data,
|
||||||
}: VegaICellRendererParams<
|
}: VegaICellRendererParams<
|
||||||
MarketFieldsFragment,
|
MarketFieldsFragment,
|
||||||
'tradableInstrument.instrument.product.settlementAsset'
|
'tradableInstrument.instrument.product.settlementAsset.symbol'
|
||||||
>) =>
|
>) => {
|
||||||
value ? (
|
const value =
|
||||||
|
data?.tradableInstrument.instrument.product.settlementAsset;
|
||||||
|
return value ? (
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
openAssetDetailsDialog(value.id, e.target as HTMLElement);
|
openAssetDetailsDialog(value.id, e.target as HTMLElement);
|
||||||
@ -102,8 +104,8 @@ export const MarketsTable = ({ data }: MarketsTableProps) => {
|
|||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
) : (
|
) : (
|
||||||
''
|
''
|
||||||
)
|
);
|
||||||
}
|
}}
|
||||||
/>
|
/>
|
||||||
<AgGridColumn
|
<AgGridColumn
|
||||||
flex={2}
|
flex={2}
|
||||||
|
@ -203,13 +203,15 @@ export const MarketListTable = forwardRef<
|
|||||||
/>
|
/>
|
||||||
<AgGridColumn
|
<AgGridColumn
|
||||||
headerName={t('Settlement asset')}
|
headerName={t('Settlement asset')}
|
||||||
field="tradableInstrument.instrument.product.settlementAsset"
|
field="tradableInstrument.instrument.product.settlementAsset.symbol"
|
||||||
cellRenderer={({
|
cellRenderer={({
|
||||||
value,
|
data,
|
||||||
}: VegaICellRendererParams<
|
}: VegaICellRendererParams<
|
||||||
MarketMaybeWithData,
|
MarketMaybeWithData,
|
||||||
'tradableInstrument.instrument.product.settlementAsset'
|
'tradableInstrument.instrument.product.settlementAsset.symbol'
|
||||||
>) => {
|
>) => {
|
||||||
|
const value =
|
||||||
|
data?.tradableInstrument.instrument.product.settlementAsset;
|
||||||
return value ? (
|
return value ? (
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
|
@ -216,6 +216,7 @@ export const PositionsTable = forwardRef<AgGridReact, Props>(
|
|||||||
/>
|
/>
|
||||||
<AgGridColumn
|
<AgGridColumn
|
||||||
headerName={t('Settlement asset')}
|
headerName={t('Settlement asset')}
|
||||||
|
field="assetSymbol"
|
||||||
colId="asset"
|
colId="asset"
|
||||||
minWidth={100}
|
minWidth={100}
|
||||||
cellRenderer={({ data }: VegaICellRendererParams<Position>) => {
|
cellRenderer={({ data }: VegaICellRendererParams<Position>) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user