Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow null block inside InputGroup Component #202

Merged
merged 2 commits into from
Sep 27, 2016
Merged

Allow null block inside InputGroup Component #202

merged 2 commits into from
Sep 27, 2016

Conversation

andersr
Copy link
Contributor

@andersr andersr commented Sep 27, 2016

Currently, the following snippet:

...
  <InputGroup>
    {null}
    <Input />
  </InputGroup>
...

Results in this error:

InputGroup.getIconProps
    InputGroup.js:105
InputGroup.renderChildren
    InputGroup.js:171
InputGroup.render
    InputGroup.js:236
<unknown>
    ReactCompositeComponent.js:793
measureLifeCyclePerf
    ReactCompositeComponent.js:74
ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext
    ReactCompositeComponent.js:792
ReactCompositeComponentWrapper._renderValidatedComponent
    ReactCompositeComponent.js:819
ReactCompositeComponentWrapper.performInitialMount
    ReactCompositeComponent.js:361
ReactCompositeComponentWrapper.mountComponent
    ReactCompositeComponent.js:257
Object.mountComponent
    ReactReconciler.js:47

This update allows for inserting a null value inside the InputGroup block, making something like the following possible:

...
  <InputGroup>
    { displayIcon ? myIcon : null }
    <Input />
  </InputGroup>
...

It appears that this update also addresses #137

@andersr andersr changed the title Allow null block inside InputGroup Allow null block inside InputGroup Component Sep 27, 2016
@himanshu-satija himanshu-satija merged commit d166b9c into GeekyAnts:master Sep 27, 2016
@andersr andersr deleted the allow-null-icon branch September 27, 2016 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants