Skip to content

Layout context not working for bool props #567

Description

@mbohal

Usecase:

Im trying to get an InputGroup with one child element disabled and one not:

<InputGroup>
  <TextField
    label="First name"
    disabled
  />
  <TextField
    label="Last name"
  />
</InputGroup>

Problem:

In the above example:

Current behaviour: none of the TextFields is disabled
Expected behaviour: The First name TextField is disabled

Likely cause is

where the contextProp is checked for being null / undefined but not against being false.

Solution:

We need to figure out how to take into account the default prop value in

. Assuming the default is null / undefined does not work for bool typed props.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions