diff --git a/package.json b/package.json
index f21a6683..ff0bbeee 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@soramitsu/soramitsu-js-ui",
- "version": "0.7.3",
+ "version": "0.7.4",
"private": false,
"publishConfig": {
"registry": "https://nexus.iroha.tech/repository/npm-soramitsu-private/"
diff --git a/src/components/Input/SInput.vue b/src/components/Input/SInput.vue
index 2ecac0be..d6f53b46 100644
--- a/src/components/Input/SInput.vue
+++ b/src/components/Input/SInput.vue
@@ -3,12 +3,12 @@
class="s-input"
:class="computedClasses"
>
- {{ placeholder }}
+ {{ placeholder }}
@@ -138,7 +138,6 @@ export default class SInput extends Mixins(BorderRadiusMixin) {
focused = false
autofill = false
- model = this.value
mounted (): void {
this.$el.addEventListener('animationstart', this.changeAutofillValue)
@@ -152,17 +151,6 @@ export default class SInput extends Mixins(BorderRadiusMixin) {
this.autofill = e.animationName === 'onAutoFillStart'
}
- @Watch('value')
- private handlePropChange (value: string | number): void {
- this.model = value
- }
-
- @Watch('model')
- private handleValueChange (value: string | number): void {
- this.$emit('input', value)
- this.$emit('change', value)
- }
-
get isTextInput (): boolean {
return this.type === InputType.TEXT
}
@@ -223,7 +211,10 @@ export default class SInput extends Mixins(BorderRadiusMixin) {
this.$emit('change', value)
}
- handlePaste (value: string | number): void {
+ handlePaste (event: ClipboardEvent): void {
+ if (!event || !event.clipboardData) return
+
+ const value = event.clipboardData.getData('text')
this.$emit('paste', value)
}
@@ -254,7 +245,9 @@ export default class SInput extends Mixins(BorderRadiusMixin) {
const file = input.files[0]
const fr = new FileReader()
fr.onload = (event: ProgressEvent) => {
- this.model = ((event.target || {}).result as string)
+ const result = (event.target || {}).result as string
+ this.handleInput(result)
+ this.handleChange(result)
}
fr.readAsText(file)
}