(props)
| 91 | } |
| 92 | |
| 93 | private static getSelectOption(props) { |
| 94 | let defaultSelectedOption: ISelectOptionProps = {}; |
| 95 | const defaultValue = props.value || props.defaultValue; |
| 96 | const options = Children.toArray(props.children); |
| 97 | for (const option of options) { |
| 98 | if (isValidElement(option)) { |
| 99 | const optionProps = option.props as ISelectOptionProps; |
| 100 | if (optionProps.value && optionProps.value === defaultValue) { |
| 101 | defaultSelectedOption = { |
| 102 | ...optionProps, |
| 103 | name: |
| 104 | optionProps.name || |
| 105 | (optionProps.children as string), |
| 106 | }; |
| 107 | break; |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | return defaultSelectedOption; |
| 112 | } |
| 113 | |
| 114 | private getDefaultState(props) { |
| 115 | return { |
no outgoing calls
no test coverage detected