Skip to content

Commit 7c157a0

Browse files
authored
fix(DualListSelector): resolve tsc type issues (#11346)
1 parent 2c6037e commit 7c157a0

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

packages/react-core/src/components/DualListSelector/DualListSelector.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export interface DualListSelectorProps {
5959
addSelectedAriaLabel?: string;
6060
/** Tooltip content for the dynamically built add selected button */
6161
addSelectedTooltip?: React.ReactNode;
62-
/** Additonal tooltip properties for the dynamically built add selected tooltip */
62+
/** Additional tooltip properties for the dynamically built add selected tooltip */
6363
addSelectedTooltipProps?: any;
6464
/** Callback fired every time dynamically built options are chosen or removed */
6565
onListChange?: (
@@ -73,23 +73,23 @@ export interface DualListSelectorProps {
7373
addAllAriaLabel?: string;
7474
/** Tooltip content for the dynamically built add all button */
7575
addAllTooltip?: React.ReactNode;
76-
/** Additonal tooltip properties for the dynamically built add all tooltip */
76+
/** Additional tooltip properties for the dynamically built add all tooltip */
7777
addAllTooltipProps?: any;
7878
/** Optional callback for the dynamically built remove selected button */
7979
removeSelected?: (newAvailableOptions: React.ReactNode[], newChosenOptions: React.ReactNode[]) => void;
8080
/** Accessible label for the dynamically built remove selected button */
8181
removeSelectedAriaLabel?: string;
8282
/** Tooltip content for the dynamically built remove selected button */
8383
removeSelectedTooltip?: React.ReactNode;
84-
/** Additonal tooltip properties for the dynamically built remove selected tooltip */
84+
/** Additional tooltip properties for the dynamically built remove selected tooltip */
8585
removeSelectedTooltipProps?: any;
8686
/** Optional callback for the dynamically built remove all button */
8787
removeAll?: (newAvailableOptions: React.ReactNode[], newChosenOptions: React.ReactNode[]) => void;
8888
/** Accessible label for the dynamically built remove all button */
8989
removeAllAriaLabel?: string;
9090
/** Tooltip content for the dynamically built remove all button */
9191
removeAllTooltip?: React.ReactNode;
92-
/** Additonal tooltip properties for the dynamically built remove all tooltip */
92+
/** Additional tooltip properties for the dynamically built remove all tooltip */
9393
removeAllTooltipProps?: any;
9494
/** Optional callback fired when a dynamically built option is selected */
9595
onOptionSelect?: (
@@ -286,8 +286,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
286286
chosenFilteredOptions: newChosen,
287287
availableOptions: newAvailable,
288288
availableFilteredOptions: newAvailable,
289-
chosenOptionsSelected: [],
290-
availableOptionsSelected: []
289+
chosenOptionsSelected: [] as number[],
290+
availableOptionsSelected: [] as number[]
291291
};
292292
});
293293
};
@@ -319,8 +319,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
319319
chosenFilteredOptions: newChosen,
320320
availableOptions: newAvailable,
321321
availableFilteredOptions: newAvailable,
322-
availableTreeOptionsChecked: [],
323-
chosenTreeOptionsChecked: []
322+
availableTreeOptionsChecked: [] as string[],
323+
chosenTreeOptionsChecked: [] as string[]
324324
};
325325
});
326326
};
@@ -342,8 +342,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
342342
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);
343343

344344
return {
345-
chosenOptionsSelected: [],
346-
availableOptionsSelected: [],
345+
chosenOptionsSelected: [] as number[],
346+
availableOptionsSelected: [] as number[],
347347
chosenOptions: newChosen,
348348
chosenFilteredOptions: newChosen,
349349
availableOptions: newAvailable,
@@ -374,8 +374,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
374374
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);
375375

376376
return {
377-
availableTreeOptionsChecked: [],
378-
chosenTreeOptionsChecked: [],
377+
availableTreeOptionsChecked: [] as string[],
378+
chosenTreeOptionsChecked: [] as string[],
379379
availableOptions: newAvailable,
380380
chosenOptions: newChosen
381381
};
@@ -404,8 +404,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
404404
chosenFilteredOptions: newChosen,
405405
availableOptions: newAvailable,
406406
availableFilteredOptions: newAvailable,
407-
chosenOptionsSelected: [],
408-
availableOptionsSelected: []
407+
chosenOptionsSelected: [] as number[],
408+
availableOptionsSelected: [] as number[]
409409
};
410410
});
411411
};
@@ -433,8 +433,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
433433
return {
434434
chosenOptions: newChosen,
435435
availableOptions: newAvailable,
436-
availableTreeOptionsChecked: [],
437-
chosenTreeOptionsChecked: []
436+
availableTreeOptionsChecked: [] as string[],
437+
chosenTreeOptionsChecked: [] as string[]
438438
};
439439
});
440440
};
@@ -456,8 +456,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
456456
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);
457457

458458
return {
459-
chosenOptionsSelected: [],
460-
availableOptionsSelected: [],
459+
chosenOptionsSelected: [] as number[],
460+
availableOptionsSelected: [] as number[],
461461
chosenOptions: newChosen,
462462
chosenFilteredOptions: newChosen,
463463
availableOptions: newAvailable,
@@ -488,8 +488,8 @@ class DualListSelector extends React.Component<DualListSelectorProps, DualListSe
488488
this.props.onListChange && this.props.onListChange(event, newAvailable, newChosen);
489489

490490
return {
491-
availableTreeOptionsChecked: [],
492-
chosenTreeOptionsChecked: [],
491+
availableTreeOptionsChecked: [] as string[],
492+
chosenTreeOptionsChecked: [] as string[],
493493
availableOptions: newAvailable,
494494
chosenOptions: newChosen
495495
};

0 commit comments

Comments
 (0)