-
Notifications
You must be signed in to change notification settings - Fork 24
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
valuePrepareFunction + valueStoreFunction is a mess #138
Comments
Another use case for this madness : I have a readonly column with date that I just want to show formatted. |
Hi Guys, just to tell you that I have fixed this locally. |
Thank you for the report. The I will look into this, when I have some time. But with a first quick test on the demo page I could not reproduce the behavior you describe. But I will definitely take some more time to look into this deeper. |
I have figured out that the main issue is that the However, the fact that the That said, the
I do not see your implementation of The domain of the Anyway, the recent commit should fix the issue with the |
Hello,
I'm migrating from ng2-smart-table but found a lot of issues.
Previously, the grid would display the result of valuePrepareFunction, but would keep the initial value for editing purpose.
Now, valuePrepareFunction erase the data with the result when edition start.
To fix this, you got valueStoreFunction to translate back the new value, but this method is only called on actually edited cell.
For the other unedited cells, the valuePrepareFunction erase the bound data, but are not reverted back.
Here is a simple task which became unpossible to fix, on a decimal value :
When I change the first value, it's formatted then parsed, but the second value become a formatted string and is not reverted to a number. The formatted string will be refused by the server as it can't be parsed as a decimal.
I now have to implement the createConfirm and editConfirm to parse again all values...
In your position, I would probably revert the valuePrepareFunction committing the raw value when edition start, and present the raw value for editing purpose.
If needed, you can provide a valueEditFunction to prepare the value before edition.
valueStoreFunction was a good idea.
Another option would be to force the call to valueStoreFunction when editing end on unedited cells.
The text was updated successfully, but these errors were encountered: