mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-18 07:56:56 +00:00
fix: fix the pipeline processor re-ordering issue (#8646)
This commit is contained in:
parent
a3c039006f
commit
b69ac637c3
@ -1,6 +1,7 @@
|
|||||||
import { ColumnType } from 'antd/lib/table/interface';
|
import { ColumnType } from 'antd/lib/table/interface';
|
||||||
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
|
import { DATE_TIME_FORMATS } from 'constants/dateTimeFormats';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
import { cloneDeep } from 'lodash-es';
|
||||||
import update from 'react-addons-update';
|
import update from 'react-addons-update';
|
||||||
import { ProcessorData } from 'types/api/pipeline/def';
|
import { ProcessorData } from 'types/api/pipeline/def';
|
||||||
|
|
||||||
@ -81,7 +82,7 @@ export function getProcessorUpdatedRow<T extends ProcessorData>(
|
|||||||
dragIndex: number,
|
dragIndex: number,
|
||||||
hoverIndex: number,
|
hoverIndex: number,
|
||||||
): Array<T> {
|
): Array<T> {
|
||||||
const data = processorData;
|
const data = cloneDeep(processorData);
|
||||||
const item = data.splice(dragIndex, 1)[0];
|
const item = data.splice(dragIndex, 1)[0];
|
||||||
data.splice(hoverIndex, 0, item);
|
data.splice(hoverIndex, 0, item);
|
||||||
data.forEach((item, index) => {
|
data.forEach((item, index) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user