Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/patternfly-3/patternfly-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"patternfly": "^3.58.0",
"react-bootstrap": "^0.32.1",
"react-bootstrap-switch": "^15.5.3",
"react-bootstrap-typeahead": "^3.1.3",
"react-bootstrap-typeahead": "^3.4.1",
"react-c3js": "^0.1.20",
"react-click-outside": "^3.0.1",
"react-collapse": "^4.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ TypeAheadSelectStories.addWithInfo('Menu Alignment', () => {
<br />
<br />
<h2>Menu Alignment</h2>
<TypeAheadSelect align={align} options={Mocks.countries} labelKey="country" placeholder="Choose a state..." />
<TypeAheadSelect
id="some-typeahead"
align={align}
options={Mocks.countries}
labelKey="country"
placeholder="Choose a state..."
/>
</div>
);
});
Expand All @@ -66,7 +72,13 @@ TypeAheadSelectStories.addWithInfo('Input Size', () => {
<br />
<br />
<h2>Input Size</h2>
<TypeAheadSelect bsSize={bsSize} options={Mocks.countries} labelKey="name" placeholder="Choose a state..." />
<TypeAheadSelect
id="some-typeahead"
bsSize={bsSize}
options={Mocks.countries}
labelKey="name"
placeholder="Choose a state..."
/>
</div>
);
});
Expand All @@ -82,6 +94,7 @@ TypeAheadSelectStories.addWithInfo('Multiple Selection', () => {
<br />
<h2>Multiple Selection</h2>
<TypeAheadSelect
id="some-typeahead"
Copy link
Member

Choose a reason for hiding this comment

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

Are ID's required now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

They will be required in the next version,
Currently it just raises an unpleasant deprecation warning each render

multiple={multiple}
clearButton={clearButton}
selected={['Burkina Fasu', 'Papua New Guinea', 'Satellite']}
Expand All @@ -104,6 +117,7 @@ TypeAheadSelectStories.addWithInfo('Highlight Results', () => {
<br />
<h2>Highlight Results</h2>
<TypeAheadSelect
id="some-typeahead"
highlightOnlyResult={highlightOnlyResult}
selectHintOnEnter={selectHintOnEnter}
options={Mocks.countries}
Expand All @@ -127,6 +141,7 @@ TypeAheadSelectStories.addWithInfo('Allow Adding New Items', () => {
<strong>If a search result doesn&apos;t exist, allow the user to add a custom input.</strong>
</p>
<TypeAheadSelect
id="some-typeahead"
multiple
allowNew={allowNew}
newSelectionPrefix="Create and select item: "
Expand All @@ -148,6 +163,7 @@ TypeAheadSelectStories.addWithInfo('Min Chars To AutoComplete', () => {
<br />
<h2>AutoCompletion will start when there are enough characters.</h2>
<TypeAheadSelect
id="some-typeahead"
minLength={minLength}
options={Mocks.countries}
labelKey="name"
Expand Down Expand Up @@ -176,6 +192,7 @@ TypeAheadSelectStories.addWithInfo('Use With Forms', () => {
<div className="col-sm-10">
<FormGroup>
<TypeAheadSelect
id="some-typeahead"
minLength={1}
submitFormOnEnter={submitFormOnEnter}
labelKey="name"
Expand Down Expand Up @@ -210,6 +227,7 @@ TypeAheadSelectStories.addWithInfo('Using Async Calls', () => {
<br />
<h2>Search a Forker</h2>
<AsyncTypeAheadSelect
id="some-typeahead"
labelKey="login"
minLength={0}
placeholder="Search someone who have forked Patternfly-react.."
Expand All @@ -233,6 +251,7 @@ TypeAheadSelectStories.addWithInfo('Controlled input value', () => (
<strong>A default value will be shown when the component is rendered.</strong>
</p>
<TypeAheadSelect
id="some-typeahead"
defaultInputValue="Denmark"
options={Mocks.countries}
labelKey="name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TypeAheadSelect } from './index';
test('TypeAheadSelect is working !!', () => {
const component = shallow(
<p>
<TypeAheadSelect clearButton multiple allowNew options={['One', 'Two', 'Three']} />
<TypeAheadSelect clearButton multiple allowNew id="some-id" options={['One', 'Two', 'Three']} />
</p>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AsyncTypeAheadSelect is working !! 1`] = `
<AsyncContainer(OnClickOutside(TypeaheadContainer(WrappedTypeahead)))
<AsyncContainer(TypeaheadContainer(WrappedTypeahead))
delay={200}
isLoading={false}
labelKey="login"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,49 @@

exports[`TypeAheadSelect is working !! 1`] = `
<p>
<OnClickOutside(TypeaheadContainer(WrappedTypeahead))
<TypeaheadContainer(WrappedTypeahead)
a11yNumResults={[Function]}
a11yNumSelected={[Function]}
align="justify"
allowNew={true}
autoFocus={false}
caseSensitive={false}
clearButton={true}
eventTypes={
Array [
"mousedown",
"touchstart",
]
}
excludeScrollbar={false}
defaultInputValue=""
defaultOpen={false}
defaultSelected={Array []}
disabled={false}
dropup={false}
emptyLabel="No matches found."
filterBy={Array []}
flip={false}
highlightOnlyResult={false}
id="some-id"
ignoreDiacritics={true}
inputProps={Object {}}
isInvalid={false}
isLoading={false}
isValid={false}
labelKey="label"
maxResults={100}
minLength={0}
multiple={true}
onBlur={[Function]}
onFocus={[Function]}
onInputChange={[Function]}
onKeyDown={[Function]}
onPaginate={[Function]}
options={
Array [
"One",
"Two",
"Three",
]
}
outsideClickIgnoreClass="ignore-react-onclickoutside"
preventDefault={false}
stopPropagation={false}
paginate={true}
paginationText="Display additional results..."
placeholder=""
selectHintOnEnter={false}
/>
</p>
`;