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

Select-field floatingLabelStyle prop addition #1450

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/src/app/components/pages/components/text-fields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ let TextFieldsPage = React.createClass({
selectValue: undefined,
selectValue2: undefined,
selectValueLinkValue: 4,
selectValueLinkValue2: 3,
floatingValueLinkValue: 'Value Link'
};
},
Expand Down Expand Up @@ -269,6 +270,20 @@ let TextFieldsPage = React.createClass({
<SelectField
valueLink={this.linkState('selectValueLinkValue')}
floatingLabelText="Float Label Text"
valueMember="id"
displayMember="name"
menuItems={arbitraryArrayMenuItems} /><br/>
<SelectField
valueLink={this.linkState('selectValueLinkValue2')}
floatingLabelText="Float Custom Label Text"
floatingLabelStyle={{color: "red"}}
valueMember="id"
displayMember="name"
menuItems={arbitraryArrayMenuItems} /><br/>
<SelectField
valueLink={this.linkState('selectValueLinkValue2')}
floatingLabelText="Float Custom Label Text"
floatingLabelStyle={{color: "red"}}
valueMember="id"
displayMember="name"
menuItems={arbitraryArrayMenuItems} /><br/>
Expand Down
7 changes: 7 additions & 0 deletions docs/src/app/components/raw-code/text-fields-code.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@
valueMember="id"
displayMember="name"
menuItems={arbitraryArrayMenuItems} />
<SelectField
valueLink={this.linkState('selectValueLinkValue2')}
floatingLabelText="Float Custom Label Text"
floatingLabelStyle={{color: "red"}}
valueMember="id"
displayMember="name"
menuItems={arbitraryArrayMenuItems} />
<SelectField
value={this.state.selectValue2}
onChange={this._handleSelectValueChange.bind(null, 'selectValue2')}
Expand Down
2 changes: 2 additions & 0 deletions src/select-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ let SelectField = React.createClass({
menuItems,
disabled,
floatingLabelText,
floatingLabelStyle,
hintText,
fullWidth,
errorText,
Expand All @@ -107,6 +108,7 @@ let SelectField = React.createClass({
let textFieldProps = {
style: this.mergeAndPrefix(styles.input, style),
floatingLabelText: floatingLabelText,
floatingLabelStyle: floatingLabelStyle,
hintText: (!hintText && !floatingLabelText) ? ' ' : hintText,
fullWidth: fullWidth,
errorText: errorText,
Expand Down