Skip to content

Commit

Permalink
Fix #6944: Improve Checkbox PT Options in MultiSelect (#6945)
Browse files Browse the repository at this point in the history
* fix: use correct type definition, reflecting usage in code

* fix: no need for checkbox icon pt options, part of checkbox pt option

* fix: no need for header checkbox icon pt options, part of header checkbox pt option

---------

Co-authored-by: Pascal Economou <[email protected]>
  • Loading branch information
peconomou929 and Pascal Economou authored Jul 29, 2024
1 parent 9153b42 commit 22addcc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/lib/multiselect/MultiSelectHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const MultiSelectHeader = React.memo((props) => {
{
className: cx('headerCheckboxIcon')
},
getPTOptions('headerCheckboxIcon')
getPTOptions('headerCheckbox.icon')
);

const headerCheckboxContainerProps = mergeProps(
Expand Down
2 changes: 1 addition & 1 deletion components/lib/multiselect/MultiSelectItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const MultiSelectItem = React.memo((props) => {
{
className: cx('checkboxIcon')
},
getPTOptions('checkboxIcon')
getPTOptions('checkbox.icon')
);

const icon = props.checkboxIcon || <CheckIcon {...checkboxIconProps} />;
Expand Down
10 changes: 1 addition & 9 deletions components/lib/multiselect/multiselect.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ export interface MultiSelectPassThroughOptions {
* Uses to pass attributes to the header checkbox's container DOM element.
*/
headerCheckboxContainer?: MultiSelectPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
/**
* Uses to pass attributes to the header checkbox icon's DOM element.
*/
headerCheckboxIcon?: MultiSelectPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
/**
* Uses to pass attributes to the header checkbox's DOM element.
*/
Expand Down Expand Up @@ -152,11 +148,7 @@ export interface MultiSelectPassThroughOptions {
/**
* Uses to pass attributes to the checkbox's DOM element.
*/
checkbox?: MultiSelectPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
/**
* Uses to pass attributes to the checkbox icon's DOM element.
*/
checkboxIcon?: MultiSelectPassThroughType<React.SVGProps<SVGSVGElement> | React.HTMLAttributes<HTMLSpanElement>>;
checkbox?: CheckboxPassThroughOptions;
/**
* Uses to pass attributes to the emptyMessage's DOM element.
*/
Expand Down

0 comments on commit 22addcc

Please sign in to comment.