disallowGroups => hideGroups
parent
e353eda31f
commit
a2487d9b2e
|
@ -116,7 +116,7 @@ describe("<LocationForm/>", () => {
|
|||
it("shows groups in dropdown", () => {
|
||||
const p = fakeProps();
|
||||
p.shouldDisplay = () => true;
|
||||
p.disallowGroups = false;
|
||||
p.hideGroups = false;
|
||||
const wrapper = shallow(<LocationForm {...p} />);
|
||||
expect(wrapper.find(FBSelect).first().props().list).toContainEqual({
|
||||
headingId: "Coordinate",
|
||||
|
|
|
@ -17,9 +17,9 @@ export interface DefaultValueFormProps {
|
|||
onChange: (v: ParameterDeclaration) => void;
|
||||
}
|
||||
|
||||
export const DefaultValueForm = (props: DefaultValueFormProps) =>
|
||||
props.variableNode.kind === "parameter_declaration"
|
||||
? <div className="default-value-form">
|
||||
export const DefaultValueForm = (props: DefaultValueFormProps) => {
|
||||
if (props.variableNode.kind === "parameter_declaration") {
|
||||
return <div className="default-value-form">
|
||||
<div className="default-value-tooltip">
|
||||
<Help text={ToolTips.DEFAULT_VALUE} position={Position.TOP_LEFT} />
|
||||
</div>
|
||||
|
@ -32,9 +32,13 @@ export const DefaultValueForm = (props: DefaultValueFormProps) =>
|
|||
shouldDisplay={() => true}
|
||||
allowedVariableNodes={AllowedVariableNodes.variable}
|
||||
hideTypeLabel={true}
|
||||
hideGroups={true}
|
||||
onChange={change(props.onChange, props.variableNode)} />
|
||||
</div>
|
||||
: <div />;
|
||||
</div>;
|
||||
} else {
|
||||
return <div />;
|
||||
}
|
||||
};
|
||||
|
||||
const change =
|
||||
(onChange: (v: ParameterDeclaration) => void, variable: VariableNode) =>
|
||||
|
|
|
@ -49,8 +49,9 @@ interface CommonProps {
|
|||
* chooses between reassignment vs. creation for new variables,
|
||||
* and determines which variables to display in the form. */
|
||||
allowedVariableNodes: AllowedVariableNodes;
|
||||
/** Don't display group dropdown items. */
|
||||
disallowGroups?: boolean;
|
||||
/** Do not show `groups` as an option. Eg: Don't allow the user to pick
|
||||
* "group123" in the sequence editor header. */
|
||||
hideGroups?: boolean;
|
||||
/** Add ability to collapse the form content. */
|
||||
collapsible?: boolean;
|
||||
collapsed?: boolean;
|
||||
|
@ -74,9 +75,6 @@ export interface LocationFormProps extends CommonProps {
|
|||
hideTypeLabel?: boolean;
|
||||
/** Set to true to hide the form header and label. */
|
||||
hideHeader?: boolean;
|
||||
/** Do not show `groups` as an option. Eg: Don't allow the user to pick
|
||||
* "group123" in the sequence editor header. */
|
||||
hideGroups?: boolean;
|
||||
}
|
||||
|
||||
export const PARENT = (label: string) =>
|
||||
|
|
|
@ -96,7 +96,7 @@ export class TileMoveAbsolute extends React.Component<StepParams, MoveAbsState>
|
|||
hideHeader={true}
|
||||
locationDropdownKey={JSON.stringify(this.props.currentSequence)}
|
||||
allowedVariableNodes={AllowedVariableNodes.identifier}
|
||||
disallowGroups={true}
|
||||
hideGroups={true}
|
||||
width={3} />
|
||||
|
||||
SpeedInput = () =>
|
||||
|
|
Loading…
Reference in New Issue