diff --git a/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js b/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js index 46c7d0fb6..5cf4354b1 100644 --- a/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js +++ b/monkey/monkey_island/cc/ui/src/components/ui-components/AdvancedMultiSelect.js @@ -33,12 +33,19 @@ class AdvancedMultiSelect extends React.Component { constructor(props) { super(props); + let pluginNames = this.props.value.map(v => v.name); + this.state = { - allPluginNames: this.props.value.map(v => v.name), - masterCheckboxState: this.getMasterCheckboxState(this.props.value.map(v => v.name)), + infoPaneParams: getDefaultPaneParams( + this.props.schema.items.$ref, + this.props.registry, + this.isUnsafeOptionSelected(pluginNames) + ), + allPluginNames: pluginNames, + masterCheckboxState: this.getMasterCheckboxState(pluginNames), pluginDefinitions: getObjectFromRegistryByRef(this.props.schema.items.$ref, this.props.registry).pluginDefs, - selectedPluginNames: this.props.value.map(v => v.name) + selectedPluginNames: pluginNames }; } @@ -173,12 +180,6 @@ class AdvancedMultiSelect extends React.Component { schema } = this.props; - let paneParams = getDefaultPaneParams( - this.props.schema.items.$ref, - this.props.registry, - this.isUnsafeOptionSelected(this.state.selectedPluginNames) - ); - return (
- +
); }