Skip to content

Commit

Permalink
St 10787/feat/improve quantity input ux (#183)
Browse files Browse the repository at this point in the history
* ST-10787 feat improve quantity input ux

* ST-10787 feat release version
  • Loading branch information
Ima-Acikima authored Sep 26, 2023
1 parent 5f30055 commit ba11ea6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@supplycart/ui",
"version": "1.14.35",
"version": "1.14.36",
"repository": {
"type": "git",
"url": "https://github.com/supplycart/ui"
Expand Down
12 changes: 11 additions & 1 deletion src/form/components/QuantityInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
:description="description"
:required="required"
:input-class="inputClass"
@focus="onFocus = true"
@focus="
onFocus = true;
focus();
"
/>
</template>
<script>
Expand Down Expand Up @@ -125,6 +128,13 @@ export default {
this.$emit("blur", e);
this.onFocus = false;
},
focus() {
this.$nextTick(function () {
const input = this.$el.querySelector("input");
input.focus();
input.select();
});
},
},
};
</script>

0 comments on commit ba11ea6

Please sign in to comment.