Fix escalation reordering (#1957)

# What this PR does

Fixed bug in Escalation Chains where reordering an item crashed the list

#1936
This commit is contained in:
Rares Mardare 2023-05-17 14:48:45 +03:00 committed by GitHub
parent 2cc3be2ee4
commit e2284ef337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View file

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Fixed
- Fixed bug in Escalation Chains where reordering an item crashed the list
## v1.2.23 (2023-05-15)
### Added

View file

@ -36,7 +36,11 @@ import styles from './EscalationPolicy.module.css';
const cx = cn.bind(styles);
export interface EscalationPolicyProps {
interface ElementSortableProps {
index: number;
}
export interface EscalationPolicyProps extends ElementSortableProps {
data: EscalationPolicyType;
waitDelays?: any[];
isDisabled?: boolean;

View file

@ -76,6 +76,7 @@ const EscalationChainSteps = observer((props: EscalationChainStepsProps) => {
return (
<EscalationPolicy
index={index} // This in here is a MUST for the SortableElement
key={`item-${escalationPolicy.id}`}
data={escalationPolicy}
number={index + offset + 1}