【问题标题】:Datatables: combining Row Reorder and Form Inputs数据表:结合行重新排序和表单输入
【发布时间】:2015-10-29 01:08:05
【问题描述】:

我正在尝试将两者结合起来

行重新排序 https://datatables.net/extensions/rowreorder/examples/initialisation/events.html

表单输入 https://www.datatables.net/examples/api/form.html

我希望能够拥有拖放行排序和可编辑数据。

这是我无法弄清楚的问题:每次我拖放重新排序一行时,它都会将数据恢复到初始状态,而不是用户在文本字段中键入的内容。我希望数据输入字段保持不变!

谁有解决办法?

$(document).ready(function () {
var table = $('#mytable').DataTable({
    rowReorder: true,
    lengthMenu: [[-1, 25, 100, 200], ["All", 25, 100, 200]],
    columnDefs: [
        { orderable: true, className: 'reorder', targets: 0 },
        { orderable: false, targets: '_all' }
    ],
});

HTML是标准的table,tr,td,input type=text type的东西。

编辑:

这是由于库中的一个错误,该错误已被修复。

【问题讨论】:

    标签: jquery datatables


    【解决方案1】:

    此错误已在 Datatables 的 RowReorder 插件版本 1.1.0 中得到修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-19
      • 2016-04-12
      • 1970-01-01
      • 1970-01-01
      • 2022-01-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多