mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
getLoadValue() was previously using the find method for getting the selected model on load when not using the Record Finder in relation mode. This means it was searching by the primary key, regardless of whether the keyFrom setting on the Record Finder widget was changed. This has the effect of the keyFrom setting being correctly used to determine the value of the record finder field when a model is selected, but the widget being unable to find the model when it refreshes or reloads. This change instead searches for the field's value in the column specified for the keyFrom setting, allowing us to use a different identifying column for loading the selected record.