Skip to content

Commit d03ed0c

Browse files
committed
fix(suir): add default titles for sort in duallist
1 parent 0352f01 commit d03ed0c

File tree

2 files changed

+156
-413
lines changed

2 files changed

+156
-413
lines changed

packages/suir-component-mapper/src/dual-list-select/dual-list-select.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ const DualList = ({
163163
rightValues,
164164
handleValuesClick,
165165
validateOnMount,
166+
leftSortTitle,
167+
rightSortTitle,
166168
OptionsListProps,
167169
OptionProps,
168170
LabelProps: { className: labelClassName, error: labelError, ...LabelProps },
@@ -212,6 +214,7 @@ const DualList = ({
212214
value={state.filterOptions}
213215
placeholder={filterOptionsTitle}
214216
id={`${input.name}-options-toolbar`}
217+
sortTitle={leftSortTitle}
215218
{...ToolbarProps}
216219
/>
217220
</GridColumn>
@@ -296,6 +299,7 @@ const DualList = ({
296299
value={state.filterValue}
297300
placeholder={filterValueTitle}
298301
id={`${input.name}-value-toolbar`}
302+
sortTitle={rightSortTitle}
299303
{...ToolbarProps}
300304
/>
301305
</GridColumn>
@@ -355,6 +359,8 @@ DualList.propTypes = {
355359
rightValues: PropTypes.array,
356360
handleValuesClick: PropTypes.func,
357361
validateOnMount: PropTypes.bool,
362+
leftSortTitle: PropTypes.node,
363+
rightSortTitle: PropTypes.node,
358364
/** Sub components customization API */
359365
OptionsListProps: PropTypes.object,
360366
OptionProps: PropTypes.object,
@@ -384,6 +390,8 @@ DualList.defaultProps = {
384390
filterValueTitle: 'Filter selected value',
385391
filterOptionsText: 'Remove your filter to see all options',
386392
filterValueText: 'Remove your filter to see all selected',
393+
leftSortTitle: 'Sort options',
394+
rightSortTitle: 'Sort value',
387395
options: [],
388396
allToLeft: true,
389397
allToRight: true,

0 commit comments

Comments
 (0)