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

refactor(react): remove default placeholder from Combobox, TextArea, TextInput, MultiSelect, FilterableMultiselect #9510

Merged
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ Map {
"type": "func",
},
"placeholder": Object {
"isRequired": true,
"type": "string",
},
"selectedItem": Object {
Expand Down
4 changes: 0 additions & 4 deletions packages/react/src/components/ComboBox/ComboBox-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const combobox = () => (
id="carbon-combobox"
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter..."
titleText="ComboBox title"
helperText="Combobox helper text"
/>
Expand All @@ -76,7 +75,6 @@ export const combobox = () => (

const props = () => ({
id: text('Combobox ID (id)', 'carbon-combobox-example'),
placeholder: text('Placeholder text (placeholder)', 'Filter...'),
titleText: text('Title (titleText)', 'Combobox title'),
helperText: text('Helper text (helperText)', 'Optional helper text here'),
light: boolean('Light (light)', false),
Expand Down Expand Up @@ -124,7 +122,6 @@ export const disabled = () => (
disabled
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter..."
titleText="ComboBox title"
helperText="Combobox helper text"
/>
Expand All @@ -139,7 +136,6 @@ export const light = () => (
light
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter..."
titleText="ComboBox title"
helperText="Combobox helper text"
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/ComboBox/ComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ ComboBox.propTypes = {
* Used to provide a placeholder text node before a user enters any input.
* This is only present if the control has no items selected
*/
placeholder: PropTypes.string.isRequired,
placeholder: PropTypes.string,

/**
* For full control of the selection
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/components/TextArea/TextArea-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const TextAreaProps = () => ({
'A valid value is required'
),
helperText: text('Helper text (helperText)', 'Optional helper text.'),
placeholder: text('Placeholder text (placeholder)', 'Placeholder text.'),
id: 'test2',
cols: number('Columns (columns)', 50),
rows: number('Rows (rows)', 4),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const props = {
),
size: select('Field size (size)', sizes, undefined) || undefined,
labelText: text('Label text (labelText)', 'Text input label'),
placeholder: text('Placeholder text (placeholder)', 'Placeholder text'),
light: boolean('Light variant (light)', false),
disabled: boolean('Disabled (disabled)', false),
hideLabel: boolean('No label (hideLabel)', false),
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/TextInput/TextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const TextInput = React.forwardRef(function TextInput(
type,
ref,
className: textInputClasses,
title: placeholder,
dakahn marked this conversation as resolved.
Show resolved Hide resolved
title: labelText,
disabled: normalizedProps.disabled,
readOnly,
...other,
Expand Down