Skip to content

Commit

Permalink
fix(DualListSelector): Resolve tsc type issues in PF6 (#11360)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrances17 authored Dec 19, 2024
1 parent 7e33336 commit 6a1686f
Showing 1 changed file with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface DualListSelectorProps {
addSelectedAriaLabel?: string;
/** Tooltip content for the dynamically built add selected button */
addSelectedTooltip?: React.ReactNode;
/** Additonal tooltip properties for the dynamically built add selected tooltip */
/** Additional tooltip properties for the dynamically built add selected tooltip */
addSelectedTooltipProps?: any;
/** Callback fired every time dynamically built options are chosen or removed */
onListChange?: (
Expand All @@ -73,23 +73,23 @@ export interface DualListSelectorProps {
addAllAriaLabel?: string;
/** Tooltip content for the dynamically built add all button */
addAllTooltip?: React.ReactNode;
/** Additonal tooltip properties for the dynamically built add all tooltip */
/** Additional tooltip properties for the dynamically built add all tooltip */
addAllTooltipProps?: any;
/** Optional callback for the dynamically built remove selected button */
removeSelected?: (newAvailableOptions: React.ReactNode[], newChosenOptions: React.ReactNode[]) => void;
/** Accessible label for the dynamically built remove selected button */
removeSelectedAriaLabel?: string;
/** Tooltip content for the dynamically built remove selected button */
removeSelectedTooltip?: React.ReactNode;
/** Additonal tooltip properties for the dynamically built remove selected tooltip */
/** Additional tooltip properties for the dynamically built remove selected tooltip */
removeSelectedTooltipProps?: any;
/** Optional callback for the dynamically built remove all button */
removeAll?: (newAvailableOptions: React.ReactNode[], newChosenOptions: React.ReactNode[]) => void;
/** Accessible label for the dynamically built remove all button */
removeAllAriaLabel?: string;
/** Tooltip content for the dynamically built remove all button */
removeAllTooltip?: React.ReactNode;
/** Additonal tooltip properties for the dynamically built remove all tooltip */
/** Additional tooltip properties for the dynamically built remove all tooltip */
removeAllTooltipProps?: any;
/** Optional callback fired when a dynamically built option is selected */
onOptionSelect?: (
Expand Down Expand Up @@ -286,8 +286,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
chosenFilteredOptions: newChosen,
availableOptions: newAvailable,
availableFilteredOptions: newAvailable,
chosenOptionsSelected: [],
availableOptionsSelected: []
chosenOptionsSelected: [] as number[],
availableOptionsSelected: [] as number[]
};
});
};
Expand Down Expand Up @@ -319,8 +319,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
chosenFilteredOptions: newChosen,
availableOptions: newAvailable,
availableFilteredOptions: newAvailable,
availableTreeOptionsChecked: [],
chosenTreeOptionsChecked: []
availableTreeOptionsChecked: [] as string[],
chosenTreeOptionsChecked: [] as string[]
};
});
};
Expand All @@ -342,8 +342,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);

return {
chosenOptionsSelected: [],
availableOptionsSelected: [],
chosenOptionsSelected: [] as number[],
availableOptionsSelected: [] as number[],
chosenOptions: newChosen,
chosenFilteredOptions: newChosen,
availableOptions: newAvailable,
Expand Down Expand Up @@ -374,8 +374,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);

return {
availableTreeOptionsChecked: [],
chosenTreeOptionsChecked: [],
availableTreeOptionsChecked: [] as string[],
chosenTreeOptionsChecked: [] as string[],
availableOptions: newAvailable,
chosenOptions: newChosen
};
Expand Down Expand Up @@ -404,8 +404,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
chosenFilteredOptions: newChosen,
availableOptions: newAvailable,
availableFilteredOptions: newAvailable,
chosenOptionsSelected: [],
availableOptionsSelected: []
chosenOptionsSelected: [] as number[],
availableOptionsSelected: [] as number[]
};
});
};
Expand Down Expand Up @@ -433,8 +433,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
return {
chosenOptions: newChosen,
availableOptions: newAvailable,
availableTreeOptionsChecked: [],
chosenTreeOptionsChecked: []
availableTreeOptionsChecked: [] as string[],
chosenTreeOptionsChecked: [] as string[]
};
});
};
Expand All @@ -456,8 +456,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);

return {
chosenOptionsSelected: [],
availableOptionsSelected: [],
chosenOptionsSelected: [] as number[],
availableOptionsSelected: [] as number[],
chosenOptions: newChosen,
chosenFilteredOptions: newChosen,
availableOptions: newAvailable,
Expand Down Expand Up @@ -488,8 +488,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);

return {
availableTreeOptionsChecked: [],
chosenTreeOptionsChecked: [],
availableTreeOptionsChecked: [] as string[],
chosenTreeOptionsChecked: [] as string[],
availableOptions: newAvailable,
chosenOptions: newChosen
};
Expand Down

0 comments on commit 6a1686f

Please sign in to comment.