Ngx-datatable: Inline Edit Allows Empty Values Which Breaks the Edit Capability

Created on 22 Feb 2017  路  5Comments  路  Source: swimlane/ngx-datatable

I'm submitting a ... (check one with "x")

[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior
In the inline edit demo, http://swimlane.github.io/ngx-datatable/#, if you clear the contents of a cell, then the cell goes to non-edit mode and you can't reenter into edit mode.

Expected behavior
You should either not be able to disable cell input when the content is empty or you filler content should be used when the cell is empty.

Reproduction of the problem

  1. Open http://swimlane.github.io/ngx-datatable/#.
    2.Click inline edit. Clear the content.
  2. Click outside of the cell so that you are no longer in editing mode.
  3. Try and edit the field again. You can no longer edit.

What is the motivation / use case for changing the behavior?
A table with inline edit enabled should not be able to enter an invalid state.

Please tell us about your environment:
Google Chrome, OS X

  • Table version: 6.1.1

  • Angular version: 2.0.x

  • Browser: Chrome 56

  • Language: TypeScript

Most helpful comment

I fixed it by making span class="container-fluid", the container has red background (for demonstration purposes ofc) so even when my field comment is empty it can be clicked and edited
screenshot_20180901_082344

All 5 comments

The inline edit demo is only a demo, we don't have plans to support this out of the box.

Is the inline edit feature itself not supported or just the demo? I can reproduce this issue outside of the demo, and provide a plnkr if that helps.

Not a feature supported by core. It was only done in the demo for demonstration purposes. If its a core bug, I'm hapy to look into it if you provide a demo :)

Oh ok. Thanks for the explanation. Have a great weekend.

I fixed it by making span class="container-fluid", the container has red background (for demonstration purposes ofc) so even when my field comment is empty it can be clicked and edited
screenshot_20180901_082344

Was this page helpful?
0 / 5 - 0 ratings