@lemonadejs/dropdown 3.1.12 → 3.2.1

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/dist/react.d.ts CHANGED
@@ -1,15 +1,15 @@
1
- /**
2
- * Official Type definitions for the LemonadeJS plugins
3
- * https://lemonadejs.net
4
- * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
- */
6
- import Component from './index';
7
-
8
- interface Dropdown {
9
- (): any
10
- [key: string]: any
11
- }
12
-
13
- declare function Dropdown<Dropdown>(props: Component.Options): any;
14
-
15
- export default Dropdown;
1
+ /**
2
+ * Official Type definitions for the LemonadeJS plugins
3
+ * https://lemonadejs.net
4
+ * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+ */
6
+ import Component from './index';
7
+
8
+ interface Dropdown {
9
+ (): any
10
+ [key: string]: any
11
+ }
12
+
13
+ declare function Dropdown<Dropdown>(props: Component.Options): any;
14
+
15
+ export default Dropdown;
package/dist/react.js CHANGED
@@ -1,37 +1,37 @@
1
- // @ts-nocheck
2
- import React, { useRef, useEffect } from "react";
3
- import Component from './index';
4
-
5
-
6
- // @ts-ignore
7
- export default React.forwardRef((props, mainReference) => {
8
- // Dom element
9
- const Ref = useRef(null);
10
-
11
- // Get the properties for the spreadsheet
12
- let options = { ...props };
13
-
14
- useEffect(() => {
15
- // @ts-ignore
16
- if (!Ref.current.innerHTML) {
17
- mainReference.current = Component(Ref.current, options);
18
- }
19
- }, []);
20
-
21
- useEffect(() => {
22
- for (let key in props) {
23
- if (props.hasOwnProperty(key) && mainReference.current.hasOwnProperty(key)) {
24
- if (props[key] !== mainReference.current[key]) {
25
- mainReference.current[key] = props[key];
26
- }
27
- }
28
- }
29
- }, [props])
30
-
31
- let prop = {
32
- ref: Ref,
33
- style: { height: '100%', width: '100%' }
34
- };
35
-
36
- return React.createElement("div", prop);
1
+ // @ts-nocheck
2
+ import React, { useRef, useEffect } from "react";
3
+ import Component from './index';
4
+
5
+
6
+ // @ts-ignore
7
+ export default React.forwardRef((props, mainReference) => {
8
+ // Dom element
9
+ const Ref = useRef(null);
10
+
11
+ // Get the properties for the spreadsheet
12
+ let options = { ...props };
13
+
14
+ useEffect(() => {
15
+ // @ts-ignore
16
+ if (!Ref.current.innerHTML) {
17
+ mainReference.current = Component(Ref.current, options);
18
+ }
19
+ }, []);
20
+
21
+ useEffect(() => {
22
+ for (let key in props) {
23
+ if (props.hasOwnProperty(key) && mainReference.current.hasOwnProperty(key)) {
24
+ if (props[key] !== mainReference.current[key]) {
25
+ mainReference.current[key] = props[key];
26
+ }
27
+ }
28
+ }
29
+ }, [props])
30
+
31
+ let prop = {
32
+ ref: Ref,
33
+ style: { height: '100%', width: '100%' }
34
+ };
35
+
36
+ return React.createElement("div", prop);
37
37
  })