silverstripe-dependentdropdownfield icon indicating copy to clipboard operation
silverstripe-dependentdropdownfield copied to clipboard

Duplicate empty string values in dropdown

Open mak001 opened this issue 8 years ago • 0 comments

screenshot from 2018-01-05 13-47-10

This seems to be caused by DropdownField::Field() adding the empty value after DependentDropdownField::getSource() adds it to the actual source array.

https://github.com/sheadawson/silverstripe-dependentdropdownfield/blob/108adf37a360dab5b2139b98b2840834513da469/code/DependentDropdownField.php#L86-L90

Changing these lines to return $source seems to fix the problem.

mak001 avatar Jan 05 '18 19:01 mak001