Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zbeebembg opened this issue Oct 22, 2024 · 1 comment
Open

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

zbeebembg opened this issue Oct 22, 2024 · 1 comment

Comments

@zbeebembg
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants