Skip to content

Commit

Permalink
feat(protocol-designer): drag and drop step reordering
Browse files Browse the repository at this point in the history
Add drag and drop functionality allowing users to arbitrarily reorder there steps in the steplist.

Closes #2654
  • Loading branch information
b-cooper committed Nov 27, 2018
1 parent d16e7fe commit 5593f31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions protocol-designer/src/steplist/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ const orderedSteps: Reducer<OrderedStepsState, *> = handleActions({
LOAD_FILE: (state: OrderedStepsState, action: LoadFileAction): OrderedStepsState =>
getPDMetadata(action.payload).orderedSteps,
REORDER_SELECTED_STEP: (state: OrderedStepsState, action: ReorderSelectedStepAction): OrderedStepsState => {
// TODO: BC 2018-11-27 make util function for reordering and use it everywhere
const {delta, stepId} = action.payload
const stepsWithoutSelectedStep = state.filter(s => s !== stepId)
const selectedIndex = state.findIndex(s => s === stepId)
Expand Down

0 comments on commit 5593f31

Please sign in to comment.