Skip to content

Commit 0a202a0

Browse files
authored
feat (cascadeselect): add panelStyles and panelClassName props (#8002)
* feat (cascadeselect): add panelStyles and panelClassName props * chore: cleanup
1 parent 627ed06 commit 0a202a0

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

components/lib/cascadeselect/CascadeSelect.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,8 @@ export const CascadeSelect = React.memo(
415415
const panelProps = mergeProps(
416416
{
417417
ref: overlayRef,
418-
className: cx('panel'),
418+
className: classNames(props.panelClassName, cx('panel')),
419+
style: props.panelStyle,
419420
onClick: (e) => onPanelClick(e)
420421
},
421422
ptm('panel')

components/lib/cascadeselect/CascadeSelectBase.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ export const CascadeSelectBase = ComponentBase.extend({
154154
optionLabel: null,
155155
optionValue: null,
156156
options: null,
157+
panelClassName: null,
158+
panelStyle: null,
157159
placeholder: null,
158160
scrollHeight: '400px',
159161
style: null,

components/lib/cascadeselect/cascadeselect.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,14 @@ export interface CascadeSelectProps extends Omit<React.DetailedHTMLProps<React.I
336336
* @defaultValue false
337337
*/
338338
unstyled?: boolean;
339+
/**
340+
* Style class of the cascadeselect panel.
341+
*/
342+
panelClassName?: string | undefined;
343+
/**
344+
* Inline style of the cascadeselect panel.
345+
*/
346+
panelStyle?: React.CSSProperties | undefined;
339347
}
340348

341349
/**

0 commit comments

Comments
 (0)