linear-react-components-ui 1.1.21-beta.3 → 1.1.21-beta.4

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/lib/form/index.js CHANGED
@@ -229,10 +229,13 @@ const Form = _ref => {
229
229
  }, [JSON.stringify(dataSource), useInternalState]);
230
230
  (0, _react.useEffect)(() => {
231
231
  if (securityBeforeUnload) {
232
- if (context) context.setSecurityBeforeUnload(true);
232
+ if (Object.entries(context).length) context.setSecurityBeforeUnload(true);
233
233
  window.addEventListener('beforeunload', onBeforeUnload);
234
234
  }
235
- return () => window.removeEventListener('beforeunload', onBeforeUnload);
235
+ return () => {
236
+ if (securityBeforeUnload && Object.entries(context).length) context.setSecurityBeforeUnload(false);
237
+ window.removeEventListener('beforeunload', onBeforeUnload);
238
+ };
236
239
  }, [securityBeforeUnload, onBeforeUnload]);
237
240
  (0, _react.useEffect)(() => {
238
241
  if (!disabled && submitOnPressEnterKey !== submitFormOnEnter) {
@@ -42,7 +42,7 @@ declare const getMaskOptions: ({ isDateField, placeholderChar, min, max, lazy, p
42
42
  mask?: any;
43
43
  hint?: string | string[] | undefined;
44
44
  hintPosition?: "below" | "onLabelRight" | undefined;
45
- themePopover?: "light" | "dark" | undefined;
45
+ themePopover?: "dark" | "light" | undefined;
46
46
  popoverAlign?: "left" | "right" | undefined;
47
47
  placeholderChar: string;
48
48
  min: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.1.21-beta.3",
3
+ "version": "1.1.21-beta.4",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",