"use strict";

exports.__esModule = true;
exports["default"] = buildNextTableMethod;
var methodList = ['editRow', 'saveRow', 'resetRow', 'validateRow', 'getDataSource'];
function buildNextTableMethod(instance) {
  methodList.forEach(function (name) {
    instance[name] = function () {
      var tableRef = instance.tableRef;
      var current = tableRef.current;
      if (current) {
        var method = current[name];
        if (method) {
          return method.apply(current, arguments);
        }
      }
    };
  });
}