diff --git a/src/components/ActionsMenu/index.jsx b/src/components/ActionsMenu/index.jsx index 5100d570..b888ade0 100644 --- a/src/components/ActionsMenu/index.jsx +++ b/src/components/ActionsMenu/index.jsx @@ -4,6 +4,7 @@ * Shows dropdown menu with actions. */ import React, { useState, useCallback } from "react"; +import _ from "lodash"; import PT from "prop-types"; import "./styles.module.scss"; import OutsideClickHandler from "react-outside-click-handler"; @@ -89,7 +90,7 @@ const ActionsMenu = ({ options = [] }) => { {...attributes.popper} >
- {options.map((option, index) => { + {_.reject(options, "hidden").map((option, index) => { if (option.separator) { return
; } else { @@ -124,6 +125,7 @@ ActionsMenu.propTypes = { label: PT.string, action: PT.func, separator: PT.bool, + hidden: PT.bool, }) ), }; diff --git a/src/components/FormField/index.jsx b/src/components/FormField/index.jsx index 2af5c131..677246ce 100644 --- a/src/components/FormField/index.jsx +++ b/src/components/FormField/index.jsx @@ -87,6 +87,7 @@ const FormField = ({ field }) => { onChange={input.onChange} onBlur={input.onBlur} onFocus={input.onFocus} + disabled={field.disabled} /> )} {(field.isRequired || field.customValidator) && diff --git a/src/components/ReactSelect/index.jsx b/src/components/ReactSelect/index.jsx index cb6c3bec..567b70b2 100644 --- a/src/components/ReactSelect/index.jsx +++ b/src/components/ReactSelect/index.jsx @@ -84,6 +84,7 @@ const ReactSelect = (props) => { onInputChange={props.onInputChange} noOptionsMessage={() => props.noOptionsText} createOptionPosition="first" + isDisabled={props.disabled} /> ) : (