angular-ui/ui-grid

cell value not showing after end cell edit with custom datalist template

Open

#6,755 建立於 2018年6月14日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)JavaScript (2,496 fork)batch import
help wantedneeds: analysis

倉庫指標

Star
 (5,395 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Cannot get value to display in cell after editing with this custom template. If I leave out the ui-grid-editor directive in the input field, the value shows in the cell but it doesn't fire the end edit event, so the cell maintains focus no matter where I go. Is there something else I should be doing to ensure the value is displayed once the end cell event fires? The event fires with ui-grid-editor directive in the input, as I paused inside the afterCellEdit event but the cell shows blank once it loses focus, although the value is actually there(when I click back in the cell to get focus, the value pops up).

Basically the purpose of this template is to allow users to enter an option if their option is not present in the dropdown(aka the datalist, a valid HTML5 type).

<div>
    <form name="inputForm">
        <input type="text" list="Con_list" ui-grid-editor ng-model="MODEL_COL_FIELD" />
        <datalist id="Con_list">
            <option ng-repeat="option in col.colDef.editDropdownOptionsArray"  value=" 
            {{option.Position}}">{{option.Position}}</option>
        </datalist>
    </form>
</div>

貢獻者指南