-
Notifications
You must be signed in to change notification settings - Fork 109
Conversation
|
||
/** | ||
* Атрибут формы, а не компонента | ||
* @deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кажется, для этого есть deprecation type. @akitov?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/input/input.jsx
Outdated
id: this.props.id, | ||
name: this.props.name, | ||
type: props.type, | ||
formNoValidate: props.formNoValidate || props.noValidate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Здесь должна быть проверка на undefined, если formNoValidate false, то применится noValidate.
src/input/input.jsx
Outdated
let isMaskedInput = this.props.mask !== undefined; | ||
let value = this.props.value !== undefined | ||
? this.props.value | ||
let props = this.props; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Очень много изменений из-за того, что убираем обращение через this. Если это необходимый рефакторинг, то лучше вынести его отдельным коммитом.
package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "arui-feather", | |||
"version": "9.5.0", | |||
"version": "9.5.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем?
b9e6811
to
411533a
Compare
@@ -183,6 +189,7 @@ class Input extends React.Component { | |||
} | |||
|
|||
renderContent(cn, MaskedInput) { | |||
let hasValidateAttr = this.props.formNoValidate !== undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я думаю можно опустить создание переменной - ты используешь результат всего один раз.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
код легче читается, нежели
this.props.formNoValidate !== undefined ? this.props.formNoValidate : this.props.noValidate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тогда выровняй нейминг с переменной ниже
|
||
/** | ||
* Атрибут формы, а не компонента | ||
* @deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
25ede18
to
18deff0
Compare
input noValidate --> formNoValidate
Мотивация и контекст
У инпута нет такого атрибута.