EasyAdminBundle
EasyAdminBundle copied to clipboard
Fix: keep existing formatted value
This PR allows for overriding the formattedValue via Field::setFormattedValue.
In my application I used something like this:
yield CollectionField::new('foo')
->setFormattedValue("bar");
However it wasn't respected and I still got only the count of items in the datatable on index page.
~~This PR also sets the formattedValue, when the fields value was set manually. I don't think it is desired to not set the formattedValue at least equal to the value itself, even though the value was manually provided.~~
I also added a test case äquivilent to those for the Fields.
It feels a bit weird to use AbstractFieldTest for a Configurator, however the necessary functionality was provided through set class.