gd-sprest-bs 10.12.21 → 10.12.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -887,6 +887,20 @@ exports.ListForm.renderEditForm = function (props) {
887
887
  }
888
888
  // See if there is a template
889
889
  if (props.template) {
890
+ // Method to handle template control events
891
+ var processEvent_1 = function (event, control, refControl) {
892
+ // Set the event
893
+ refControl[event] = function () {
894
+ var args = [];
895
+ for (var _i = 0; _i < arguments.length; _i++) {
896
+ args[_i] = arguments[_i];
897
+ }
898
+ // Call the events
899
+ control[event].apply(control, args);
900
+ refControl[event].apply(refControl, args);
901
+ };
902
+ };
903
+ // Method to update the template control
890
904
  var updateControl = function (refControl) {
891
905
  // Get the control from the mapper
892
906
  var control = refControl && mapper[refControl.name] ? mapper[refControl.name].controlProps : null;
@@ -898,8 +912,15 @@ exports.ListForm.renderEditForm = function (props) {
898
912
  if (refControl[key]) {
899
913
  continue;
900
914
  }
901
- // Update the property
902
- refControl[key] = control[key];
915
+ // See if this is an internal event
916
+ if (key == "onControlRendering" || key == "onControlRendered") {
917
+ // Ensure both events are called
918
+ processEvent_1(key, control, refControl);
919
+ }
920
+ else {
921
+ // Update the property
922
+ refControl[key] = control[key];
923
+ }
903
924
  }
904
925
  }
905
926
  };