Skip to content

Commit 4408cd5

Browse files
new Name SearchMultiSelectGroups
1 parent 46c6eaa commit 4408cd5

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

_tests/molecules/SearchMultiSelectExtended.test .js renamed to _tests/molecules/SearchMultiSelectGroups.test .js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* globals mount */
22
import React from 'react';
3-
import SearchMultiSelectExtended from '../../components/molecules/SearchMultiSelectExtended';
3+
import SearchMultiSelectGroups from '../../components/molecules/SearchMultiSelectGroups';
44

55
const defaultProps = {
66
options: [
@@ -20,9 +20,9 @@ const defaultProps = {
2020
multiTerm: false
2121
};
2222

23-
describe('Expect <SearchMultiSelectExtended>', () => {
23+
describe('Expect <SearchMultiSelectGroups>', () => {
2424
it('to render', () => {
25-
const wrapper = mount(<SearchMultiSelectExtended {...defaultProps} />);
25+
const wrapper = mount(<SearchMultiSelectGroups {...defaultProps} />);
2626
expect(wrapper).toMatchSnapshot();
2727
});
2828
});

components/molecules/SearchMultiSelectExtended.jsx renamed to components/molecules/SearchMultiSelectGroups.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Checkbox from './Checkbox';
99
import arraysEqual from '../utils/arraysEqual';
1010
import escapeRegExp from '../utils/escapeRegExp';
1111

12-
const SearchMultiSelectExtended = ({
12+
const SearchMultiSelectGroups = ({
1313
options,
1414
searchKeys,
1515
multiTerm,
@@ -369,9 +369,9 @@ const getMatchingIndexes = (options, query, config) => {
369369
return matchingOptionsIndex.length > 0 ? matchingOptionsIndex : matchingSingleIndex;
370370
};
371371

372-
SearchMultiSelectExtended.displayName = 'SearchMultiSelectExtended';
372+
SearchMultiSelectGroups.displayName = 'SearchMultiSelectGroups';
373373

374-
SearchMultiSelectExtended.defaultProps = {
374+
SearchMultiSelectGroups.defaultProps = {
375375
context: 'primary',
376376
placeholder: '',
377377
size: 'md',
@@ -381,7 +381,7 @@ SearchMultiSelectExtended.defaultProps = {
381381
termDivider: /[ ,]+/,
382382
};
383383

384-
SearchMultiSelectExtended.propTypes = {
384+
SearchMultiSelectGroups.propTypes = {
385385
/** List of options {array of objects} */
386386
options: PropTypes.array.isRequired,
387387
/** Function that returns the latest change on options */
@@ -402,4 +402,4 @@ SearchMultiSelectExtended.propTypes = {
402402
inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
403403
};
404404

405-
export default SearchMultiSelectExtended;
405+
export default SearchMultiSelectGroups;

stories/molecules/SearchMultiSelectExtended.mdx renamed to stories/molecules/SearchMultiSelectGroups.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { Story, Props } from '@storybook/addon-docs/blocks';
22
import { Canvas, Source } from '@storybook/blocks';
33
import { ArgsTable } from '@storybook/addon-docs';
44

5-
import * as SearchMultiSelectExtendedStories from './SearchMultiSelectExtended.stories';
6-
import SearchMultiSelectExtended from '../../components/molecules/SearchMultiSelectExtended';
5+
import * as SearchMultiSelectGroupsStories from './SearchMultiSelectGroups.stories';
6+
import SearchMultiSelectGroups from '../../components/molecules/SearchMultiSelectGroups';
77

8-
# SearchMultiSelectExtended
8+
# SearchMultiSelectGroups
99

10-
The `<SearchMultiSelectExtended>` is similar to the `<MultiSelect>` component, but this component can display hierarchical tree data. In addition, it shows the selection in grouped and allows user to search the options for quick filtering and selection.
10+
The `<SearchMultiSelectGroups>` is an option list which can also contain groups. It shows the selection grouped as a tree and allows user to search the options for quick filtering and selection.
1111

12-
As the name suggests, the `<SearchMultiSelectExtended>` comes with a case insensitive term matching, and a small tag indicator to show you how many options were selected, as well a small balloon where you can quickly see what options you have selected so far.
12+
As the name suggests, the `<SearchMultiSelectGroups>` comes with a small tag indicator to show you how many options were selected, as well a small balloon where you can quickly see what options you have selected so far.
1313

14-
Search-Multi-select supports nested options [See Nested Options](#nested-options). When a parent option is selected, all children will be selected. If all children are selected, the parent will be selected too.
14+
Search-Multi-Select-Groups supports nested options [See Nested Options](#nested-options). When a parent option is selected, all children will be selected. If all children are selected, the parent will be selected too.
1515

1616
## Options
1717

@@ -104,7 +104,7 @@ const pets = [
104104
```jsx
105105

106106
const [pets, setPets] = useState(initialPetsObject);
107-
return <SearchMultiSelectExtended onChange={newPets => setPets(newPets)} options={pets} size="md" />;
107+
return <SearchMultiSelectGroups onChange={newPets => setPets(newPets)} options={pets} size="md" />;
108108
```
109109

110110

@@ -114,12 +114,12 @@ return <SearchMultiSelectExtended onChange={newPets => setPets(newPets)} options
114114
| esc | closes the dropdown |
115115
## Component Example
116116

117-
<Canvas of={SearchMultiSelectExtendedStories.Default} />
117+
<Canvas of={SearchMultiSelectGroupsStories.Default} />
118118

119119
## Component Example Source
120120

121-
<Source of={SearchMultiSelectExtendedStories.Default} />
121+
<Source of={SearchMultiSelectGroupsStories.Default} />
122122

123-
## SearchMultiSelectExtended Props
123+
## SearchMultiSelectGroups Props
124124

125-
<ArgsTable of={SearchMultiSelectExtended} />
125+
<ArgsTable of={SearchMultiSelectGroups} />

stories/molecules/SearchMultiSelectExtended.stories.js renamed to stories/molecules/SearchMultiSelectGroups.stories.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import SearchMultiSelectExtended from '../../components/molecules/SearchMultiSelectExtended';
2+
import SearchMultiSelectGroups from '../../components/molecules/SearchMultiSelectGroups';
33

44
const optionsA = [
55
{
@@ -84,8 +84,8 @@ const optionsB = [
8484
const sizeOptions = ['', 'xs', 'sm'];
8585

8686
export default {
87-
title: 'Molecules/SearchMultiSelectExtended',
88-
component: SearchMultiSelectExtended,
87+
title: 'Molecules/SearchMultiSelectGroups',
88+
component: SearchMultiSelectGroups,
8989
argTypes: {
9090
placeholder: { control: 'text' },
9191
onChange: { action: 'change' },
@@ -98,7 +98,7 @@ export default {
9898

9999

100100
const Template = args => {
101-
return <SearchMultiSelectExtended {...args} />;
101+
return <SearchMultiSelectGroups {...args} />;
102102
};
103103

104104
export const Default = Template.bind({});

0 commit comments

Comments
 (0)