Open uap-universe opened 1 week ago
@onavatte just to help you out real quick, until I find the time to write something about it in the documentation.
The valueStoreFunction
is supposed to be the inverse of the valuePrepareFunction
.
While the valuePrepareFunction
converts the data value of any
type to a string
, the valueStoreFunction
will receive the string
and is supposed to convert it back to the correct type that is used by the data structure.
So for example when you have a field in your object start_date: Date
the
valuePrepareFunction
would format that date to a string (e.g. ISO-8601)valueStoreFunction
would parse the formatted string to a Date objectThat helped a lot. Thank you very much.
I'm currently doing a migration from ng2-smart-table and I'm struggling with the newValue property which has become private and the setValue which only accepts the string type. I think I'm not the only one. I'm not sure to understand the use of valueStoreFunction to fix this as well. So I think a short chapter on this subject in the migration guide would be appreciated.
Originally posted by @onavatte in https://github.com/dj-fiorex/angular2-smart-table/issues/127#issuecomment-2388715451