Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 810
redrom Avatar asked Dec 25 '22 01:12

redrom


1 Answers

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

$("#sortable").kendoSortable({ 
    ignore: "input"
});
like image 53
Lars Höppner Avatar answered May 01 '23 14:05

Lars Höppner