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 @@ -920,7 +920,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 @@ -68,7 +68,6 @@ export const ComboboxStory = () => (
id="carbon-combobox"
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter..."
titleText="ComboBox title"
helperText="Combobox helper text"
/>
Expand All @@ -79,7 +78,6 @@ ComboboxStory.storyName = '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 @@ -127,7 +125,6 @@ export const Disabled = () => (
disabled
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter..."
titleText="ComboBox title"
helperText="Combobox helper text"
/>
Expand All @@ -142,7 +139,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 @@ -509,7 +509,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
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ FilterableMultiSelect.propTypes = {
* Generic `placeholder` that will be used as the textual representation of
* what this field is for
*/
placeholder: PropTypes.string.isRequired,
placeholder: PropTypes.string,

/**
* Specify feedback (mode) of the selection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export const _Filterable = () => {
helperText="This is helper text"
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter"
selectionFeedback="top-after-reopen"
/>
</div>
Expand Down Expand Up @@ -142,7 +141,6 @@ export const _FilterableWithLayer = () => {
helperText="This is helper text"
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter"
selectionFeedback="top-after-reopen"
/>
<Layer>
Expand All @@ -152,7 +150,6 @@ export const _FilterableWithLayer = () => {
helperText="This is helper text"
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter"
selectionFeedback="top-after-reopen"
/>
<Layer>
Expand All @@ -162,7 +159,6 @@ export const _FilterableWithLayer = () => {
helperText="This is helper text"
items={items}
itemToString={(item) => (item ? item.text : '')}
placeholder="Filter"
selectionFeedback="top-after-reopen"
/>
</Layer>
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 @@ -26,7 +26,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 @@ -62,7 +62,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