A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuematerial/vue-material/commit/e4eb0e5 below:

Fixing the label for inputs when we received an invalid value · vuematerial/vue-material@e4eb0e5 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+7

-2

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+7

-2

lines changed Original file line number Diff line number Diff line change

@@ -60,7 +60,8 @@

60 60

password: null,

61 61

togglePassword: false,

62 62

clear: false,

63 -

file: false

63 +

file: false,

64 +

hasInvalidValue: false

64 65

}

65 66

}),

66 67

provide () {

@@ -79,7 +80,7 @@

79 80

return this.mdTogglePassword && this.MdField.password

80 81

},

81 82

hasValue () {

82 -

return this.stringValue && this.stringValue.length > 0

83 +

return (this.stringValue && this.stringValue.length > 0) || this.MdField.hasInvalidValue

83 84

},

84 85

valueLength () {

85 86

if (this.stringValue) {

Original file line number Diff line number Diff line change

@@ -24,6 +24,7 @@ export default {

24 24

if (value.constructor.toString().match(/function (\w*)/)[1].toLowerCase() !== 'inputevent') {

25 25

this.$nextTick(() => {

26 26

this.localValue = value

27 +

this.MdField.hasInvalidValue = this.isInvalidValue();

27 28

})

28 29

}

29 30

}

@@ -95,6 +96,9 @@ export default {

95 96

}

96 97

}

97 98

},

99 +

isInvalidValue () {

100 +

return this.$el.validity.badInput

101 +

},

98 102

setFieldValue () {

99 103

this.MdField.value = this.model

100 104

},

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4