Successor inline editor is only working for create links not for deleting and editing

Not able to edit links in successor inline editor and delete is also not working

{
align: ‘center’,
editor: {
map_to: ‘auto’,
type: ‘successor’,
},
hide: false,
label: ‘Successors’,
min_width: 100,
name: ‘successors’,
resize: true,
sort: false,
template: function (task) {
const links = task.$source;
const labels = [];
for (let i = 0; i < links.length; i++) {
let link = gantt.getLink(links[i]);
let copy = gantt.copy(link);
copy.target = link.source;
copy.source = link.target;
labels.push(linksFormatter?.format(copy));
}
return labels.join(', ');
},
},

Hello,
Gantt doesn’t have a built-in successor inline editor. This should be implemented manually with the Gantt API. So, it means that you have a custom solution.

It is hard to suggest what might be wrong as I don’t see your code of the custom inline editor.

Please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.

(function () {
gantt.config.editor_types.successor = {
focus: function (node) {
gantt.config.editor_types.text.focus(node);
},
get_value: function (id, column, node) {
return parseInputString(getInput(node).value || ‘’, column.editor);
},

  hide: function () {
    // called when input is hidden
    // destroy any complex editors or detach event listeners from here
  },

  is_changed: function (value, id, column, node) {
    var inputSuccessors = this.get_value(id, column, node);
    var taskSuccessors = parseInputString(
      formatSuccessors(value, column.editor, gantt),
      column.editor
    );

    return inputSuccessors.join() !== taskSuccessors.join();
  },

  is_valid: function (value, id, column, node) {
    // validate, changes will be discarded if the method returns false
    return true;
  },

  save: function (id, column, node) {
    var task = gantt.getTask(id);

    var linksDiff = getLinksDiff(task, this.get_value(id, column, node));

    if (linksDiff.add.length) {
      gantt.batchUpdate(function () {
        linksDiff.add.forEach(function (link) {
          gantt.addLink(link);
        });

        if (gantt.autoSchedule) gantt.autoSchedule();
      });
    }
  },

  set_value: function (value, id, column, node) {
    getInput(node).value = formatSuccessors(value, column.editor, gantt);
  },
  show: function (id, column, config, placeholder) {
    var html = "<div><input type='text' name='" + column.name + "'></div>";
    placeholder.innerHTML = html;
  },
};

function getInput(node) {
  return node.querySelector('input');
}
function parseInputString(value, config) {
  var successors = (value || '').split(config.delimiter || ',');
  for (var i = 0; i < successors.length; i++) {
    var val = successors[i].trim();
    if (val) {
      successors[i] = val;
    } else {
      successors.splice(i, 1);
      i--;
    }
  }
  successors.sort();
  return successors;
}

function formatSuccessors(task, config, gantt) {
  var links = task.$source;
  var labels = [];
  for (var i = 0; i < links.length; i++) {
    var link = gantt.getLink(links[i]);
    var pred = gantt.getTask(link.target);
    labels.push(gantt.getWBSCode(pred));
  }
  return labels.join((config.delimiter || ',') + ' ');
}

function getSelectedLinks(taskId, successorsCodes) {
  var links = [];
  successorsCodes.forEach(function (code) {
    var successor = gantt.getTaskByWBSCode(code);
    if (successor) {
      var link = {
        lag: 0,
        source: taskId,
        target: successor.id,
        type: gantt.config.links.finish_to_start,
      };
      if (gantt.isLinkAllowed(link)) {
        links.push(link);
      }
    }
  });
  return links;
}

function getLinksDiff(task, taskCodes) {
  var selectedLinks = getSelectedLinks(task.id, taskCodes);

  var linksToAdd = [];
  selectedLinks.forEach(function (link) {
    if (!doesLinkExist(link.source, link.target)) linksToAdd.push(link);
  });

  return {
    add: linksToAdd,
  };
}

})();

Hello,
When I try to test the provided code, I get the error message that the doesLinkExist function is missing:
https://snippet.dhtmlx.com/4ij99z02

Please add all your configuration to the snippet and make sure that the issue is reproduced there. Then, click on the Save button and send me the link.
Or send me a ready demo with all the necessary JavaScript and CSS files so that I can reproduce the issue locally.