INFRA-2867 | make options sorted
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
}
|
||||
}
|
||||
.create-incident-single-selector {
|
||||
width: 321px !important;
|
||||
width: 319px !important;
|
||||
min-height: unset;
|
||||
}
|
||||
.create-incident-single-selector + div {
|
||||
|
||||
@@ -184,7 +184,7 @@ const CreateIncidentForm: React.FC<CreateIncidentFormProps> = ({
|
||||
<div className={styles['Team-wrapper']}>
|
||||
<div className={styles['name-wrapper']}>Product</div>
|
||||
<ProductSelector
|
||||
options={state.teams}
|
||||
options={state?.teams}
|
||||
handleSelectionChange={handleTeamChange}
|
||||
selected={state.selectedTeam}
|
||||
/>
|
||||
|
||||
@@ -15,12 +15,15 @@ const IncidentSingleSelector: React.FC<IncidentSingleSelectorProps> = (
|
||||
props: IncidentSingleSelectorProps,
|
||||
) => {
|
||||
const { options, handleSelectionChange, selected, disabled = false } = props;
|
||||
const sortedOptions = options
|
||||
?.slice()
|
||||
.sort?.((a, b) => a?.label?.localeCompare(b?.label));
|
||||
const handleClearCallback = (): void => {
|
||||
handleSelectionChange('');
|
||||
};
|
||||
return (
|
||||
<SingleSelectAutoComplete
|
||||
options={options}
|
||||
options={sortedOptions}
|
||||
selectedOption={selected}
|
||||
updateSelectedOptions={handleSelectionChange}
|
||||
updateClearAllCallback={handleClearCallback}
|
||||
|
||||
@@ -89,7 +89,6 @@ const SearchResultsTable: FC<SearchResultTableProps> = ({
|
||||
if (!products || products.length === 0) return '';
|
||||
const productNames = products
|
||||
?.map((product: Team) => product.label)
|
||||
?.sort((a, b) => a.length - b.length)
|
||||
?.join(', ');
|
||||
if (productNames.length <= MAX_LENGTH) return productNames;
|
||||
|
||||
|
||||
@@ -71,8 +71,9 @@ const Dropdowns: FC = () => {
|
||||
|
||||
const updatedSeverities = generateOptions(headerData?.severities);
|
||||
const updatedStatuses = generateOptions(headerData?.incidentStatuses);
|
||||
const updatedTeams = useSelector(selectAssignerResponderData)?.assignerTeam
|
||||
?.teams;
|
||||
const updatedTeams = useSelector(selectAssignerResponderData)
|
||||
?.assignerTeam?.teams?.slice()
|
||||
?.sort?.((a, b) => a?.label?.localeCompare(b?.label));
|
||||
const initialSeverity = {
|
||||
label: incidentData?.severityName,
|
||||
value: incidentData?.severityId,
|
||||
|
||||
Reference in New Issue
Block a user