diff --git a/src/app/components/AvailableModulesMenu.jsx b/src/app/components/AvailableModulesMenu.jsx index fb8e94ff..1b96c2b0 100644 --- a/src/app/components/AvailableModulesMenu.jsx +++ b/src/app/components/AvailableModulesMenu.jsx @@ -23,6 +23,7 @@ export default class AvailableModulesMenu extends TranslatedComponent { static propTypes = { onSelect: PropTypes.func.isRequired, diffDetails: PropTypes.func, + hideSearch: PropTypes.bool, m: PropTypes.object, warning: PropTypes.func, slotDiv: PropTypes.object @@ -196,7 +197,7 @@ export default class AvailableModulesMenu extends TranslatedComponent { * @returns {React.Component} Search component if available */ _showSearch() { - if (this.props.modules instanceof Array) { + if (this.props.hideSearch) { return; } return ( diff --git a/src/app/components/Slot.jsx b/src/app/components/Slot.jsx index ef66589f..5ce16050 100644 --- a/src/app/components/Slot.jsx +++ b/src/app/components/Slot.jsx @@ -25,11 +25,12 @@ const HARDPOINT_SLOT_LABELS = { export default class Slot extends TranslatedComponent { static propTypes = { currentMenu: PropTypes.any, + hideSearch: PropTypes.bool, m: PropTypes.instanceOf(Module), warning: PropTypes.func, drag: PropTypes.func, drop: PropTypes.func, - dropClass: PropTypes.string + dropClass: PropTypes.string, }; /** @@ -188,7 +189,7 @@ export default class Slot extends TranslatedComponent { render() { let language = this.context.language; let translate = language.translate; - let { currentMenu, m, dropClass, dragOver, warning } = this.props; + let { currentMenu, m, dropClass, dragOver, warning, hideSearch } = this.props; const { menuIndex } = this.state; // TODO: implement touch dragging @@ -209,7 +210,7 @@ export default class Slot extends TranslatedComponent { {selected && menuIndex === 0 && { m.setItem(item); this.context.closeMenu(); diff --git a/src/app/components/StandardSlotSection.jsx b/src/app/components/StandardSlotSection.jsx index 847ca18a..1c09aec6 100644 --- a/src/app/components/StandardSlotSection.jsx +++ b/src/app/components/StandardSlotSection.jsx @@ -91,7 +91,7 @@ export default class StandardSlotSection extends SlotSection { */ _mkSlot(m, warning) { const { currentMenu } = this.props; - return ; }