Fixed Lists issue when reindexing, causing Radio fields to potentially lose their checked status

This commit is contained in:
Djamil Legato
2016-08-01 16:38:03 -07:00
parent 9182e6dbc1
commit 1d55ffc616
2 changed files with 7 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
* Fixed issue in Admin favicon URL [#704](https://github.com/getgrav/grav-plugin-admin/issues/704) * Fixed issue in Admin favicon URL [#704](https://github.com/getgrav/grav-plugin-admin/issues/704)
* Fixed issue in `selfupgrade` where the package would get downloaded in the wrong destination * Fixed issue in `selfupgrade` where the package would get downloaded in the wrong destination
* Hide tab when user is not authorized to access it [#712](https://github.com/getgrav/grav-plugin-admin/issues/712) * Hide tab when user is not authorized to access it [#712](https://github.com/getgrav/grav-plugin-admin/issues/712)
* Fixed Lists issue when reindexing, causing Radio fields to potentially lose their `checked` status
# v1.1.2 # v1.1.2
## 07/16/2016 ## 07/16/2016

View File

@@ -82,6 +82,7 @@ export default class CollectionsField {
items.each((index, item) => { items.each((index, item) => {
item = $(item); item = $(item);
let observed = item.find('[data-key-observe]'); let observed = item.find('[data-key-observe]');
let observedValue = observed.val(); let observedValue = observed.val();
let hasCustomKey = observed.length; let hasCustomKey = observed.length;
@@ -124,6 +125,10 @@ export default class CollectionsField {
}); });
}); });
}); });
items.find('input[type="radio"][checked]').each((index, radio) => {
radio.checked = true;
});
} }
_onAddedNodes(event, target/* , record, instance */) { _onAddedNodes(event, target/* , record, instance */) {