diff --git a/src/components/ftbot/BotControls.vue b/src/components/ftbot/BotControls.vue
index eed89437..9da13a10 100644
--- a/src/components/ftbot/BotControls.vue
+++ b/src/components/ftbot/BotControls.vue
@@ -63,7 +63,7 @@ forceexit
>
-
+
diff --git a/src/components/ftbot/ForceEntryForm.vue b/src/components/ftbot/ForceEntryForm.vue
index 556a11eb..4abba023 100644
--- a/src/components/ftbot/ForceEntryForm.vue
+++ b/src/components/ftbot/ForceEntryForm.vue
@@ -29,11 +29,16 @@
+
();
- const pair = ref('');
+ const selectedPair = ref('');
const price = ref(null);
const stakeAmount = ref(null);
const leverage = ref(null);
@@ -126,15 +137,13 @@ export default defineComponent({
};
const handleSubmit = async () => {
- pair.value = pair.value !== '' ? pair.value : botStore.activeBot.selectedPair;
- await nextTick();
// Exit when the form isn't valid
if (!checkFormValidity()) {
return;
}
// call forceentry
- const payload: ForceEnterPayload = { pair: pair.value };
+ const payload: ForceEnterPayload = { pair: selectedPair.value };
if (price.value) {
payload.price = Number(price.value);
}
@@ -157,7 +166,7 @@ export default defineComponent({
};
const resetForm = () => {
console.log('resetForm');
- pair.value = '';
+ selectedPair.value = props.pair;
price.value = null;
stakeAmount.value = null;
if (botStore.activeBot.botApiVersion > 1.1) {
@@ -176,13 +185,18 @@ export default defineComponent({
// Trigger submit handler
handleSubmit();
};
+ const inputSelect = (bvModalEvt) => {
+ bvModalEvt.srcElement?.select();
+ };
+
return {
handleSubmit,
botStore,
form,
handleEntry,
+ inputSelect,
resetForm,
- pair,
+ selectedPair,
price,
stakeAmount,
ordertype,