Even if your icdCodes
is a ko.observableArray
becuase you are directly manipulating the underlying array to swap your items KO won't be notified about this changes so it doesn't re-render the view.
To make it work you just need to call the valueHasMutated
function which notifies KO that your array has changed:
vm.icdCodes()[data.Index - 1] = currentDxCode;
vm.icdCodes()[data.Index] = previousDxCode;
vm.icdCodes.valueHasMutated();
Demo JSFiddle.