mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 03:25:15 +00:00
Correctly unselect trade row when another bar is clicked
This commit is contained in:
parent
9cf812eef1
commit
764c9e59b7
|
@ -42,7 +42,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue, Prop } from 'vue-property-decorator';
|
||||
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
|
||||
import { namespace } from 'vuex-class';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
@ -84,6 +84,15 @@ export default class TradeList extends Vue {
|
|||
|
||||
selectedItemIndex? = undefined;
|
||||
|
||||
@Watch('detailTradeId')
|
||||
watchTradeDetail(val) {
|
||||
const index = this.trades.findIndex((v) => v.trade_id === val);
|
||||
// Unselect when another tradeTable is selected!
|
||||
if (index < 0) {
|
||||
this.$refs.tradesTable.clearSelected();
|
||||
}
|
||||
}
|
||||
|
||||
get rows(): number {
|
||||
return this.trades.length;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user