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

Retain className for EuiFormControlLayout.prepend nodes #2796

Merged
merged 3 commits into from
Jan 27, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jan 27, 2020

Kibana maps application is using EuiFieldText to show the selected icon. This uses the prepend property like this. The problem is that the className property is not getting passed to the rendered prepend prop because EuiFormControlLayout over rights that prop to a static value. This PR just updates the logic to preserve the original className when provided.

        <EuiFieldText
          onClick={this._togglePopover}
          onKeyDown={this._handleKeyboardActivity}
          value={value}
          compressed
          readOnly
          fullWidth
          prepend={
            <SymbolIcon
              className="mapIconSelectSymbol__inputButton"
              symbolId={value}
              fill={isDarkMode ? 'rgb(223, 229, 239)' : 'rgb(52, 55, 65)'}
              stroke={isDarkMode ? 'rgb(255, 255, 255)' : 'rgb(0, 0, 0)'}
              strokeWidth={'1px'}
            />
          }
        />

Screen Shot 2020-01-27 at 11 58 04 AM

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks, @nreese!

Can you add a changelog entry, also?

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