@webitel/ui-sdk 2.0.5-4 → 2.0.5-7

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": "@webitel/ui-sdk",
3
- "version": "2.0.5-4",
3
+ "version": "2.0.5-7",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -218,15 +218,14 @@ export default {
218
218
  },
219
219
 
220
220
  async updateInputPaddings() {
221
- this.setTimeout(() => {
222
- // cant test this thing cause vue test utils doesnt render elements width :/
223
- const afterWrapperWidth = this.$refs['after-wrapper'].offsetWidth;
224
- const inputEl = this.$refs['wt-input'];
225
- const defaultInputPadding = getComputedStyle(document.documentElement)
226
- .getPropertyValue('--input-padding');
227
- console.info('ipnut:', defaultInputPadding, afterWrapperWidth, defaultInputPadding * 2 + afterWrapperWidth);
228
- inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
229
- }, 100);
221
+ await this.$nextTick();
222
+ // cant test this thing cause vue test utils doesnt render elements width :/
223
+ const afterWrapperWidth = this.$refs['after-wrapper'].offsetWidth;
224
+ const inputEl = this.$refs['wt-input'];
225
+ const defaultInputPadding = getComputedStyle(document.documentElement)
226
+ .getPropertyValue('--input-padding');
227
+ console.info('ipnut:', defaultInputPadding, afterWrapperWidth, defaultInputPadding * 2 + afterWrapperWidth);
228
+ inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
230
229
  },
231
230
  },
232
231
  mounted() {