Skip to content

propTypes: added value, onChange #38

Conversation

Like2Read
Copy link

This change is needed to correct usage of this control in typescript projects

Добавил описание поля value и событие onChange в propTypes

Мотивация и контекст

Без этого изменения эти поля не доступны в typescript
money-input.d.ts.txt

This change is needed to correct usage of this control in typescript projects
fractionLength: Type.number
fractionLength: Type.number,
/** Содержимое поля ввода, указанное по умолчанию */
value: Type.string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кажется, более правильно это решать на уровне library-utils. @Heymdall что думаешь?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, конечно это там надо править. Но я не уверен когда на это будет время, я когда то пробовал это сделать, из коробки просто завести наследование пропсов не получилось. Мне кажется как временный фикс - можно либо на уровне проекта подсовывать другие тайпинги, либо тут добавить их временно. Когда сделаем полноценную генерацию - можно будет грохнуть

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ставьте эту задачу на меня

@stepancar stepancar mentioned this pull request May 24, 2017
@GREENpoint
Copy link
Member

Пока деклайню: подключайте изменные *.d.ts через webpack. @stepancar берет таску на доделать генерацию.

@stepancar
Copy link
Contributor

@Like2Read залей последний фижер.
С типами все должно быть ок.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants