MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / reorderEvents

Function reorderEvents

apps/start/src/components/report/reportSlice.ts:400–410  ·  view source on GitHub ↗
(
      state,
      action: PayloadAction<{ fromIndex: number; toIndex: number }>,
    )

Source from the content-addressed store, hash-verified

398 }
399 },
400 reorderEvents(
401 state,
402 action: PayloadAction<{ fromIndex: number; toIndex: number }>,
403 ) {
404 state.dirty = true;
405 const { fromIndex, toIndex } = action.payload;
406 const [movedEvent] = state.series.splice(fromIndex, 1);
407 if (movedEvent) {
408 state.series.splice(toIndex, 0, movedEvent);
409 }
410 },
411 changeVisibleSeries(
412 state,
413 action: PayloadAction<string[] | undefined>,

Callers 1

handleDragEndFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected