@dreamcommerce/aurora 2.8.6 → 2.8.7
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/build/cjs/packages/aurora/src/components/dropdown/components/search.js +5 -1
- package/build/cjs/packages/aurora/src/components/dropdown/components/search.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/file_picker/use_file_picker.js +2 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/search.js +6 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/search.js.map +1 -1
- package/build/esm/packages/aurora/src/components/file_picker/use_file_picker.js +2 -2
- package/package.json +1 -1
|
@@ -27,8 +27,12 @@ onKeyUp }) => {
|
|
|
27
27
|
const { toggleDropdown, isOpen } = index.useDropdownContext();
|
|
28
28
|
const ref = React.useRef(null);
|
|
29
29
|
use_keyboard_open_close.useKeyboardOpenClose(toggleDropdown, isOpen, ref);
|
|
30
|
+
const [value, setValue] = React.useState('');
|
|
31
|
+
const handleOnChange = (event) => {
|
|
32
|
+
setValue(event.target.value);
|
|
33
|
+
};
|
|
30
34
|
return (React__default['default'].createElement("aside", { className: main_module['default'][css_classes.cssDropdownSearch], ref: ref },
|
|
31
|
-
React__default['default'].createElement(input['default'], { placeholder: "Szukaj", padding: "small", onKeyUp: onKeyUp, autoFocus: true })));
|
|
35
|
+
React__default['default'].createElement(input['default'], { placeholder: "Szukaj", padding: "small", value: value, onChange: handleOnChange, onKeyUp: onKeyUp, autoFocus: true })));
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
exports.default = Search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -12,8 +12,8 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
12
12
|
const [isDragOver, setDragOver] = React.useState(false);
|
|
13
13
|
const [isPreview, setPreview] = React.useState(true);
|
|
14
14
|
React.useEffect(() => {
|
|
15
|
-
setFile(initialFile);
|
|
16
|
-
}, [
|
|
15
|
+
initialFile && setFile(initialFile);
|
|
16
|
+
}, []);
|
|
17
17
|
React.useEffect(() => {
|
|
18
18
|
initialErrors && setErrors(initialErrors);
|
|
19
19
|
}, [initialErrors]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
2
|
import { useDropdownContext } from '../context/index.js';
|
|
3
3
|
import Input from '../../controls/components/input.js';
|
|
4
4
|
import { cssDropdownSearch } from '../css_classes.js';
|
|
@@ -19,8 +19,12 @@ onKeyUp }) => {
|
|
|
19
19
|
const { toggleDropdown, isOpen } = useDropdownContext();
|
|
20
20
|
const ref = useRef(null);
|
|
21
21
|
useKeyboardOpenClose(toggleDropdown, isOpen, ref);
|
|
22
|
+
const [value, setValue] = useState('');
|
|
23
|
+
const handleOnChange = (event) => {
|
|
24
|
+
setValue(event.target.value);
|
|
25
|
+
};
|
|
22
26
|
return (React.createElement("aside", { className: cssClasses[cssDropdownSearch], ref: ref },
|
|
23
|
-
React.createElement(Input, { placeholder: "Szukaj", padding: "small", onKeyUp: onKeyUp, autoFocus: true })));
|
|
27
|
+
React.createElement(Input, { placeholder: "Szukaj", padding: "small", value: value, onChange: handleOnChange, onKeyUp: onKeyUp, autoFocus: true })));
|
|
24
28
|
};
|
|
25
29
|
|
|
26
30
|
export default Search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -8,8 +8,8 @@ const useFilePicker = ({ onChange, initialFile, allowedExtensions, inputRef, ini
|
|
|
8
8
|
const [isDragOver, setDragOver] = useState(false);
|
|
9
9
|
const [isPreview, setPreview] = useState(true);
|
|
10
10
|
useEffect(() => {
|
|
11
|
-
setFile(initialFile);
|
|
12
|
-
}, [
|
|
11
|
+
initialFile && setFile(initialFile);
|
|
12
|
+
}, []);
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
initialErrors && setErrors(initialErrors);
|
|
15
15
|
}, [initialErrors]);
|