Kendo sortable : cannot edit text input inside of the sortable table

匿名 (未验证) 提交于 2019-12-03 01:39:01

问题:

I have following sortable table with sortable rows by using:

http://demos.telerik.com/kendo-ui/sortable/events

<tbody class="playlist" kendo-sortable k-placeholder="placeholder" k-hint="hint">     <!-- IF NOTHING IS FOUND-->     <tr ng-if="projectDetail.projectOrderViewConfiguration.projectEntries.length == 0">         <td colspan="9"><h1>{{ 'ADD_SOME_ITEMS_FROM_LEFT_COLUMN' | translate }}</h1></td>     </tr>     <!-- ELSE WRITEOUT-->     <tr  ng-repeat="projectEntry in projectDetail.projectOrderViewConfiguration.projectEntries">         <td>         <input type="text" ng-model="projectEntry.entry.defaultName"  class="form-control" id="cwConnectorTeam" value="{{entry.defaultName}}" />         </td>         <td>         <input type="text" ng-model="projectEntry.projectLabel"  class="form-control" id="cwConnectorTeam" value="{{entry.defaultName}}" />         </td>         <td><a ng-click="removeProjectEntryItem('{{projectEntry.id}}')">remove</a></td>     </tr>     <!-- ELSE WRITEOUT--> </tbody>

and JS

// MAKE SELECTED ENTRIES SORTABLE $scope.placeholder = function(element) {     return element.clone().addClass("placeholder").text("drop here"); }; $scope.hint = function(element) {     return element.clone().addClass("hint"); }; 

Problem is that if I tried to click on input filed I found that is not editable (maybe some z-index layer on high position).

I would like to have sortable and editable rows together. How can I solve it?

回答1:

Kendo UI's sortable widget now has a way of handling this with an ignore option:

$("#sortable").kendoSortable({      ignore: "input" });


易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!