vitmalina / w2ui

UI widgets for modern apps. Data table, forms, toolbars, sidebar, tabs, tooltips, popups. All under 120kb (gzipped).
http://w2ui.com
MIT License
2.67k stars 727 forks source link

grid column "render" no longer working for string codes #2575

Open zbeebembg opened 1 month ago

zbeebembg commented 1 month ago

Short description Not sure if this is a bug with the most recent JS compilation, but now when I have a column with the "render" field as a string, such as "int", "float:1", etc., it no longer displays the value in the grid cell. When my cells are editable ("editable": {"type": "float"}) and I start editing, the value displays as normal, but when I exit editing, it goes back to a blank cell.

When render is null or omitted, then the values display as normal, but as you already know the render field is handy for formatting the display values, such as rounding floats to a certain decimal place.

Steps to reproduce or sample grid = new w2grid({ columns: [ {field: 'float_column', text: 'Float Column', render: 'float:1', editable: {type: 'float'}}, {field: 'int_column', text: 'Int Column', render: 'int', editable: {type: 'int'}} ], records: [ {recid: 1, float_column: 45.45555, int_column: 12} ] })

ernesto1989 commented 4 weeks ago

I am facing the same issue here.

As you can see, my grid doesn't render float values when using the render prop.

image

As I remove the render prop, the values come back:

image