@bigbinary/neeto-fields-frontend 1.3.12 → 1.3.13

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.
package/README.md CHANGED
@@ -491,7 +491,8 @@ the following props:
491
491
  3. `resourceType`: The type of resource.
492
492
  4. `resourceId`: The ID of the resource.
493
493
  5. `ownerId`: The ID of the owner in case the owner is not an organization.
494
- 6. `onMutationSuccess`: The callback function which is triggered on the success
494
+ 6. `onMutate`: The callback function which is triggered on the mutations
495
+ 7. `onMutationSuccess`: The callback function which is triggered on the success
495
496
  of mutation functions of field value.
496
497
 
497
498
  #### Usage:
package/dist/index.cjs.js CHANGED
@@ -942,7 +942,7 @@ var useFormikFields = function useFormikFields(_ref) {
942
942
  disabled: disabled,
943
943
  //conditional props
944
944
  options: isDropdown$1(kind) ? fieldData : undefined,
945
- getPopupContainer: isDateTime(kind) ? ramda.prop("parentElement") : undefined
945
+ getPopupContainer: !isInline && isDateTime(kind) ? ramda.prop("parentElement") : undefined
946
946
  })
947
947
  };
948
948
  };
@@ -7884,15 +7884,20 @@ var InlineFieldValueInput = function InlineFieldValueInput(_ref) {
7884
7884
  _ref$ownerId = _ref.ownerId,
7885
7885
  ownerId = _ref$ownerId === void 0 ? "" : _ref$ownerId,
7886
7886
  _ref$onMutationSucces = _ref.onMutationSuccess,
7887
- onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces;
7887
+ onMutationSuccess = _ref$onMutationSucces === void 0 ? neetoCist.noop : _ref$onMutationSucces,
7888
+ _ref$onMutate = _ref.onMutate,
7889
+ _onMutate = _ref$onMutate === void 0 ? neetoCist.noop : _ref$onMutate;
7888
7890
  var _useState = React.useState(false),
7889
7891
  _useState2 = _slicedToArray(_useState, 2),
7890
7892
  editMode = _useState2[0],
7891
7893
  setEditMode = _useState2[1];
7892
7894
  var queryOptions = {
7895
+ onMutate: function onMutate(variables) {
7896
+ return _onMutate(variables.payload || variables);
7897
+ },
7893
7898
  onSuccess: function onSuccess() {
7894
7899
  setEditMode(false);
7895
- onMutationSuccess();
7900
+ onMutationSuccess.apply(void 0, arguments);
7896
7901
  }
7897
7902
  };
7898
7903
  var _useFieldValues = useFieldValues({