@eturnity/eturnity_reusable_components 1.2.69 → 1.2.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.69",
3
+ "version": "1.2.70",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -17,6 +17,7 @@
17
17
  <input-error-wrapper>
18
18
  <icon-container>
19
19
  <input-container
20
+ ref="inputElement"
20
21
  :placeholder="placeholder"
21
22
  :isError="isError"
22
23
  :inputWidth="inputWidth"
@@ -32,6 +33,7 @@
32
33
  :inputType="inputType"
33
34
  :type="inputTypeData"
34
35
  :fontColor="fontColor"
36
+ :hasFocus="hasFocus"
35
37
  :backgroundColor="backgroundColor"
36
38
  :disabledBackgroundColor="disabledBackgroundColor"
37
39
  />
@@ -295,6 +297,10 @@ export default {
295
297
  borderColor:{
296
298
  required:false,
297
299
  },
300
+ hasFocus: {
301
+ required: false,
302
+ default: false
303
+ }
298
304
  },
299
305
  methods: {
300
306
  onChangeHandler($event) {
@@ -310,6 +316,15 @@ export default {
310
316
  },
311
317
  created() {
312
318
  this.inputTypeData = this.inputType
319
+ },
320
+ watch: {
321
+ hasFocus(newVal) {
322
+ if (newVal) {
323
+ this.$nextTick(() => {
324
+ this.$refs.inputElement.$el.focus();
325
+ });
326
+ }
327
+ }
313
328
  }
314
329
  }
315
330
  </script>