mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-22 11:05:17 +00:00
Allow filtering in TradesList
This commit is contained in:
parent
4f4dc43688
commit
180b3c5fa3
|
@ -49,6 +49,7 @@
|
|||
<TradeList
|
||||
class="row trade-history mt-2 w-100"
|
||||
:trades="backtestResult.trades"
|
||||
:show-filter="true"
|
||||
:stake-currency="backtestResult.stake_currency"
|
||||
/>
|
||||
</b-card>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
primary-key="trade_id"
|
||||
selectable
|
||||
select-mode="single"
|
||||
:filter="filterText"
|
||||
@row-contextmenu="handleContextMenuEvent"
|
||||
@row-clicked="onRowClicked"
|
||||
@row-selected="onRowSelected"
|
||||
|
@ -54,13 +55,23 @@
|
|||
<DateTimeTZ :date="row.item.close_timestamp" />
|
||||
</template>
|
||||
</b-table>
|
||||
<b-pagination
|
||||
v-if="!activeTrades"
|
||||
v-model="currentPage"
|
||||
:total-rows="rows"
|
||||
:per-page="perPage"
|
||||
aria-controls="my-table"
|
||||
></b-pagination>
|
||||
<div class="w-100 d-flex justify-content-between">
|
||||
<b-pagination
|
||||
v-if="!activeTrades"
|
||||
v-model="currentPage"
|
||||
:total-rows="rows"
|
||||
:per-page="perPage"
|
||||
aria-controls="my-table"
|
||||
></b-pagination>
|
||||
<b-input
|
||||
v-if="showFilter"
|
||||
v-model="filterText"
|
||||
type="text"
|
||||
placeholder="Filter"
|
||||
size="sm"
|
||||
style="width: unset"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -99,6 +110,8 @@ export default class TradeList extends Vue {
|
|||
|
||||
@Prop({ default: false }) activeTrades!: boolean;
|
||||
|
||||
@Prop({ default: false }) showFilter!: boolean;
|
||||
|
||||
@Prop({ default: 'No Trades to show.' }) emptyText!: string;
|
||||
|
||||
@ftbot.State detailTradeId?: number;
|
||||
|
@ -117,6 +130,8 @@ export default class TradeList extends Vue {
|
|||
|
||||
selectedItemIndex? = undefined;
|
||||
|
||||
filterText = '';
|
||||
|
||||
@Watch('detailTradeId')
|
||||
watchTradeDetail(val) {
|
||||
const index = this.trades.findIndex((v) => v.trade_id === val);
|
||||
|
|
Loading…
Reference in New Issue
Block a user