We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ecd67f commit c547dbaCopy full SHA for c547dba
src/CheckboxGroup.js
@@ -13,6 +13,8 @@ type CheckboxGroupPropsT = {
13
};
14
15
type CheckboxGroupStateT = {
16
+ name?: string,
17
+ onChange?: (e: SyntheticEvent<HTMLInputElement>, values: Array<string>) => void,
18
values: string[],
19
20
@@ -43,7 +45,7 @@ export default class CheckboxGroup extends React.Component<
43
45
}
44
46
47
- constructor(props, state) {
48
+ constructor(props: CheckboxGroupPropsT, state: CheckboxGroupStateT) {
49
super(props, state);
50
this.state = {
51
...this.state,
@@ -56,6 +58,13 @@ export default class CheckboxGroup extends React.Component<
56
58
name: this.props.name,
57
59
60
61
+ shouldComponentUpdate(nextProps: CheckboxGroupPropsT, nextState: CheckboxGroupStateT) {
62
+ if (this.props !== nextProps || this.state !== nextState) {
63
+ return true;
64
+ }
65
+ return false;
66
67
+
68
removeValue = (value: string, originalEvent: SyntheticEvent<HTMLInputElement>) => {
69
this.setState(
70
(state) => {
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments