Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(DualListSelector): Resolve tsc type issues in PF6 #11360

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading