Skip to content

Commit

Permalink
Merge pull request #1872 from sg00dwin/add-dropdown-full-width-to-non…
Browse files Browse the repository at this point in the history
…-autocomplete-dropdowns

Add ability to include dropDownClassName="dropdown--full-width"
  • Loading branch information
openshift-merge-robot authored Jul 1, 2019
2 parents 2c455bf + 4046bc2 commit a7fcec9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/public/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ $dropdown-background--hover: $color-pf-black-200; // pf-c-dropdown__menu-item--h
.dropdown--full-width {
&,
.pf-c-dropdown__toggle {
justify-content: space-between;
width: 100%;
}
}
Expand Down
8 changes: 7 additions & 1 deletion frontend/public/components/source-to-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,13 @@ class BuildSource extends React.Component<BuildSourceProps, BuildSourceState> {
</div>
<div className="form-group">
<label className="control-label co-required" htmlFor="tag">Version</label>
<Dropdown items={tagOptions} selectedKey={selectedTag} title={tagOptions[selectedTag]} onChange={this.onTagChange} id="tag" />
<Dropdown
dropDownClassName="dropdown--full-width"
items={tagOptions}
selectedKey={selectedTag}
title={tagOptions[selectedTag]}
onChange={this.onTagChange}
id="tag" />
</div>
<div className="form-group">
<label className="control-label co-required" htmlFor="name">Name</label>
Expand Down
2 changes: 1 addition & 1 deletion frontend/public/components/utils/dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ export class Dropdown extends DropdownMixin {

//pf4 markup
return (<div className={className} ref={this.dropdownElement} style={this.props.style}>
<div className={classNames({'dropdown pf-c-dropdown': true, 'pf-m-expanded': this.state.active})}>
<div className={classNames({'dropdown pf-c-dropdown': true, 'pf-m-expanded': this.state.active}, dropDownClassName)}>
<button aria-haspopup="true" aria-expanded={this.state.active} className={classNames('pf-c-dropdown__toggle', buttonClassName)} onClick={this.toggle} onKeyDown={this.onKeyDown} type="button" id={this.props.id} aria-describedby={describedBy} >
<span className="pf-c-dropdown__toggle-text">
{titlePrefix && <span className="btn-link__titlePrefix">{titlePrefix}: </span>}
Expand Down

0 comments on commit a7fcec9

Please sign in to comment.