Spine icon indicating copy to clipboard operation
Spine copied to clipboard

Can't explicitly define value formatter for attribute

Open markst opened this issue 8 years ago • 3 comments

ValueFormatterRegistry will loop through all unformatters till there is a successful unformatted value. Which means I can't explicitly define what formatter to use for my attribute - resulting in an incorrect formatter being used for my value.

markst avatar Nov 30 '16 06:11 markst

👍 We should have an option to do this.

wvteijlingen avatar Dec 06 '16 13:12 wvteijlingen

What do you recon @wvteijlingen. Add an extra property on Field of a type ValueFormatter? It would be good to be able to reuse formatters in the formatters pool, but there may also be instances when we do not wish to add the formatter to the pool.

markst avatar Feb 09 '17 00:02 markst

Do you have a specific use case where the current system breaks down? I rather not add a formatter property to Field, because that would mean more configuration. I think for now if you want to use a different formatter, you need to create a different Field subclass.

wvteijlingen avatar Feb 11 '17 23:02 wvteijlingen