Skip to content

Commit 950d21c

Browse files
committed
Prevent rewriting classnames in pf4 dual-list
1 parent 053f113 commit 950d21c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/pf4-component-mapper/src/files/dual-list-select.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,17 @@ import FormGroup from '../common/form-group';
3636
const List = ({ value, optionClick, noOptionsTitle, filterValue, filterValueText, selectedValues, ListProps, ListItemProps, ...rest }) => (
3737
<div
3838
{...ListProps}
39-
className={clsx('pf-c-form-control', 'pf-u-pr-sm ddorg__pf4-component-mapper__dual-list-select', ListProps.className)}
4039
{...rest}
40+
className={clsx('pf-c-form-control', 'pf-u-pr-sm ddorg__pf4-component-mapper__dual-list-select', ListProps.className)}
4141
>
4242
{value.length < 1 && (
4343
<div
4444
{...ListItemProps}
45-
className="ddorg__pf4-component-mapper__dual-list-select-option-text ddorg__pf4-component-mapper__dual-list-select-option-disabled"
45+
className={clsx(
46+
'ddorg__pf4-component-mapper__dual-list-select-option-text',
47+
'ddorg__pf4-component-mapper__dual-list-select-option-disabled',
48+
ListItemProps.className
49+
)}
4650
>
4751
{filterValue ? filterValueText : noOptionsTitle}
4852
</div>
@@ -53,11 +57,11 @@ const List = ({ value, optionClick, noOptionsTitle, filterValue, filterValueText
5357
onClick={(e) => optionClick(e, value)}
5458
key={value}
5559
value={value}
60+
{...ListItemProps}
61+
{...ListItemPropsItem}
5662
className={`ddorg__pf4-component-mapper__dual-list-select-option ${
5763
selectedValues.includes(value) ? 'ddorg__pf4-component-mapper__dual-list-select-option-selected' : ''
5864
}`}
59-
{...ListItemProps}
60-
{...ListItemPropsItem}
6165
>
6266
{label}
6367
</div>

0 commit comments

Comments
 (0)