diff --git a/src/ts/@overflow/meta/react/components/CrawlerAuthInputs.tsx b/src/ts/@overflow/meta/react/components/CrawlerAuthInputs.tsx index 40db7aa..1af5b66 100644 --- a/src/ts/@overflow/meta/react/components/CrawlerAuthInputs.tsx +++ b/src/ts/@overflow/meta/react/components/CrawlerAuthInputs.tsx @@ -47,9 +47,9 @@ export class CrawlerAuthInputs extends React.Component, nextContext: any): void { - if(nextProps.metaCrawlerInputItemList !== this.props.metaCrawlerInputItemList) { - this.setState({authJson: {}}); - } + if (nextProps.metaCrawlerInputItemList !== this.props.metaCrawlerInputItemList) { + this.setState({ authJson: {} }); + } } @@ -96,8 +96,8 @@ export class CrawlerAuthInputs extends React.Component, data: InputOnChangeData) => { this.onChangeAuth(item.name, data.value); }} />); - } else if (item.inputType.name === 'Radio') { + } else if (item.inputType.name === 'SELECT_TYPE') { let itemValues = item.keyValue.split('|'); let idx = 0; - for (let itemValue of itemValues) { - elem.push(, data: CheckboxProps) => { - this.onChangeAuth(item.name, itemValue); - } - } - />); + elem.push(); + + if(this.state.authJson[item.name] === undefined) { + this.onChangeAuth(item.name, item.defaultValue); } + + for (let itemValue of itemValues) { + elem.push( + , data: CheckboxProps) => { + this.onChangeAuth(item.name, itemValue); + } + } + />); + } } return (