@visns-studio/visns-components 2.6.9 → 2.6.10
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.
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import React, {useEffect, useState, useCallback} from 'react';
|
|
1
|
+
import React, { useEffect, useState, useCallback } from 'react';
|
|
2
2
|
import CustomFetch from './Fetch';
|
|
3
3
|
import SelectList from './SelectList';
|
|
4
4
|
import AsyncSelect from 'react-select/async';
|
|
5
|
-
import {debounce} from 'lodash';
|
|
6
|
-
|
|
7
|
-
function VisnsAsyncSelect({inputValue, onChange, settings}) {
|
|
5
|
+
import { debounce } from 'lodash';
|
|
8
6
|
|
|
7
|
+
function VisnsAsyncSelect({ inputValue, onChange, settings }) {
|
|
9
8
|
const loadSuggestedOptions = useCallback(
|
|
10
9
|
debounce((inputValue, callback) => {
|
|
11
10
|
if (inputValue !== '') {
|
|
@@ -70,12 +69,16 @@ function VisnsAsyncSelect({inputValue, onChange, settings}) {
|
|
|
70
69
|
onChange={(inputValue, action) => {
|
|
71
70
|
onChange(inputValue, action, settings.id);
|
|
72
71
|
}}
|
|
73
|
-
components={{SelectList}}
|
|
72
|
+
components={{ SelectList }}
|
|
74
73
|
styles={{
|
|
75
|
-
menu: (
|
|
76
|
-
...
|
|
74
|
+
menu: (styles) => ({
|
|
75
|
+
...styles,
|
|
77
76
|
zIndex: 9999,
|
|
78
77
|
}),
|
|
78
|
+
input: (styles) => ({
|
|
79
|
+
...styles,
|
|
80
|
+
padding: 0,
|
|
81
|
+
}),
|
|
79
82
|
}}
|
|
80
83
|
value={inputValue}
|
|
81
84
|
/>
|
package/package.json
CHANGED