ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

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

Open CodeLiftSleep opened this issue 8 years ago • 5 comments

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>

CodeLiftSleep avatar Jun 14 '18 05:06 CodeLiftSleep

Can you provide a plunker demonstrating the issue?

mportuga avatar Jun 15 '18 17:06 mportuga

Here is a plunk:

https://plnkr.co/edit/jlce89jjjG7w8qVrEp8V

The first grid is without the ui-grid-editor directive and does not lose focus after you click away. It works and the value shows, it just doesn't look right. The second grid has the ui-grid-editor directive in it but it is not having the same behavior as it does on the one I'm using at work...at work it loses focus properly, but then it doesn't display anything at all, although the value is there because if you click on it again, the value will be there.

Also, there is an issue where if you load rows with the data in there, the values will be there but not show up until you click on the cell, they will display blank.

WorkMAE avatar Jun 16 '18 01:06 WorkMAE

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 18 '18 20:08 stale[bot]

Why would it need any activity? I have already provided what you asked for, how about just fix the problem?

WorkMAE avatar Sep 05 '18 16:09 WorkMAE

Thanks for contributing! This repository has been transferred, and we're preparing the new 5.x release. We're closing older issues and pull requests as part of the reset. Please join us on Discord to follow the work or continue the conversation: https://discord.gg/Baz4w8ZWN

orneryd avatar Aug 12 '26 23:08 orneryd