@rn-components-dropdown/dropdown 1.0.27 → 1.0.28

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.
Files changed (49) hide show
  1. package/dist/components/dropdown/Dropdown.js +113 -148
  2. package/dist/components/dropdown/DropdownStyle.d.ts +11 -11
  3. package/dist/components/dropdown/DropdownStyle.js +20 -24
  4. package/dist/components/dropdown/component/chip/Chip.js +14 -19
  5. package/dist/components/dropdown/component/chip/ChipStyle.d.ts +8 -18
  6. package/dist/components/dropdown/component/chip/ChipStyle.js +8 -10
  7. package/dist/components/dropdown/component/input/TextInput.js +12 -50
  8. package/dist/components/dropdown/component/input/TextInputStyle.d.ts +4 -4
  9. package/dist/components/dropdown/component/input/TextInputStyle.js +7 -11
  10. package/dist/components/dropdown/hooks/useDetectDevice.js +6 -9
  11. package/dist/components/dropdown/hooks/useDropdown.d.ts +8 -4
  12. package/dist/components/dropdown/hooks/useDropdown.js +48 -53
  13. package/dist/components/dropdown/hooks/useOrientation.js +7 -10
  14. package/dist/components/dropdown/interface/ChipInterface.js +1 -2
  15. package/dist/components/dropdown/interface/DropdownInterface.d.ts +4 -4
  16. package/dist/components/dropdown/interface/DropdownInterface.js +1 -2
  17. package/dist/components/dropdown/interface/InputProps.js +1 -2
  18. package/dist/components/svgButton/SvgButton.js +8 -13
  19. package/dist/components/svgButton/SvgButtonStyle.d.ts +2 -2
  20. package/dist/components/svgButton/SvgButtonStyle.js +7 -11
  21. package/dist/components/text/AppText.js +8 -16
  22. package/dist/components/text/AppTextStyle.d.ts +3 -156
  23. package/dist/components/text/AppTextStyle.js +8 -13
  24. package/dist/components/textInput/AppTextInput.js +19 -57
  25. package/dist/components/textInput/AppTextInputStyle.d.ts +4 -4
  26. package/dist/components/textInput/AppTextInputStyle.js +16 -20
  27. package/dist/controller/dropDownController/DropdownController.d.ts +4 -5
  28. package/dist/controller/dropDownController/DropdownController.js +13 -18
  29. package/dist/controller/dropDownController/DropdownControllerStyle.d.ts +3 -3
  30. package/dist/controller/dropDownController/DropdownControllerStyle.js +10 -14
  31. package/dist/index.js +2 -10
  32. package/dist/interface/colors.interface.js +1 -2
  33. package/dist/interface/svg.interface.js +1 -2
  34. package/dist/style/colors.js +6 -9
  35. package/dist/style/index.js +6 -23
  36. package/dist/style/shadow.d.ts +0 -149
  37. package/dist/style/shadow.js +1 -147
  38. package/dist/style/spacing.d.ts +0 -12
  39. package/dist/style/spacing.js +2 -17
  40. package/package.json +1 -1
  41. package/src/components/dropdown/Dropdown.tsx +28 -26
  42. package/src/components/dropdown/hooks/useDropdown.ts +14 -3
  43. package/src/components/dropdown/interface/DropdownInterface.ts +4 -4
  44. package/src/components/text/AppText.tsx +0 -3
  45. package/src/components/text/AppTextStyle.ts +1 -3
  46. package/src/controller/dropDownController/DropdownController.tsx +18 -17
  47. package/src/style/shadow.ts +0 -143
  48. package/src/style/spacing.ts +1 -13
  49. package/tsconfig.json +8 -4
@@ -1,23 +1,6 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.SCREEN_HEIGHT = exports.SCREEN_WIDTH = void 0;
18
- __exportStar(require("./colors"), exports);
19
- __exportStar(require("./spacing"), exports);
20
- __exportStar(require("./shadow"), exports);
21
- const react_native_1 = require("react-native");
22
- exports.SCREEN_WIDTH = react_native_1.Dimensions.get('window').width;
23
- exports.SCREEN_HEIGHT = react_native_1.Dimensions.get('window').height;
1
+ export * from './colors';
2
+ export * from './spacing';
3
+ export * from './shadow';
4
+ import { Dimensions } from 'react-native';
5
+ export const SCREEN_WIDTH = Dimensions.get('window').width;
6
+ export const SCREEN_HEIGHT = Dimensions.get('window').height;
@@ -1,24 +1,4 @@
1
1
  export declare const SHADOW: {
2
- noShadow: {
3
- shadowColor: string;
4
- shadowOffset: {
5
- width: number;
6
- height: number;
7
- };
8
- shadowOpacity: number;
9
- shadowRadius: number;
10
- elevation: number;
11
- };
12
- shadow0: {
13
- shadowColor: string;
14
- shadowOffset: {
15
- width: number;
16
- height: number;
17
- };
18
- shadowOpacity: number;
19
- shadowRadius: number;
20
- elevation: number;
21
- };
22
2
  shadow1: {
23
3
  shadowColor: string;
24
4
  shadowOffset: {
@@ -29,133 +9,4 @@ export declare const SHADOW: {
29
9
  shadowRadius: number;
30
10
  elevation: number;
31
11
  };
32
- shadow2: {
33
- shadowColor: string;
34
- shadowOffset: {
35
- width: number;
36
- height: number;
37
- };
38
- shadowOpacity: number;
39
- shadowRadius: number;
40
- elevation: number;
41
- };
42
- shadow3: {
43
- shadowColor: string;
44
- shadowOffset: {
45
- width: number;
46
- height: number;
47
- };
48
- shadowOpacity: number;
49
- shadowRadius: number;
50
- elevation: number;
51
- };
52
- shadow4: {
53
- shadowColor: string;
54
- shadowOffset: {
55
- width: number;
56
- height: number;
57
- };
58
- shadowOpacity: number;
59
- shadowRadius: number;
60
- elevation: number;
61
- };
62
- shadow5: {
63
- shadowColor: string;
64
- shadowOffset: {
65
- width: number;
66
- height: number;
67
- };
68
- shadowOpacity: number;
69
- shadowRadius: number;
70
- elevation: number;
71
- };
72
- shadow6: {
73
- shadowColor: string;
74
- shadowOffset: {
75
- width: number;
76
- height: number;
77
- };
78
- shadowOpacity: number;
79
- shadowRadius: number;
80
- elevation: number;
81
- };
82
- shadow7: {
83
- shadowColor: string;
84
- shadowOffset: {
85
- width: number;
86
- height: number;
87
- };
88
- shadowOpacity: number;
89
- shadowRadius: number;
90
- elevation: number;
91
- };
92
- shadow8: {
93
- shadowColor: string;
94
- shadowOffset: {
95
- width: number;
96
- height: number;
97
- };
98
- shadowOpacity: number;
99
- shadowRadius: number;
100
- elevation: number;
101
- };
102
- shadow9: {
103
- shadowColor: string;
104
- shadowOffset: {
105
- width: number;
106
- height: number;
107
- };
108
- shadowOpacity: number;
109
- shadowRadius: number;
110
- elevation: number;
111
- };
112
- shadow10: {
113
- shadowColor: string;
114
- shadowOffset: {
115
- width: number;
116
- height: number;
117
- };
118
- shadowOpacity: number;
119
- shadowRadius: number;
120
- elevation: number;
121
- };
122
- shadow11: {
123
- shadowColor: string;
124
- shadowOffset: {
125
- width: number;
126
- height: number;
127
- };
128
- shadowOpacity: number;
129
- shadowRadius: number;
130
- elevation: number;
131
- };
132
- shadow12: {
133
- shadowColor: string;
134
- shadowOffset: {
135
- width: number;
136
- height: number;
137
- };
138
- shadowOpacity: number;
139
- shadowRadius: number;
140
- elevation: number;
141
- };
142
- containerShadow: {
143
- shadowOffset: {
144
- width: number;
145
- height: number;
146
- };
147
- shadowOpacity: number;
148
- shadowRadius: number;
149
- elevation: number;
150
- };
151
- shadow13: {
152
- shadowColor: string;
153
- shadowOffset: {
154
- width: number;
155
- height: number;
156
- };
157
- shadowOpacity: number;
158
- shadowRadius: number;
159
- elevation: number;
160
- };
161
12
  };
@@ -1,27 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SHADOW = void 0;
4
- exports.SHADOW = {
5
- noShadow: {
6
- shadowColor: 'transparent',
7
- shadowOffset: {
8
- width: 0,
9
- height: 0,
10
- },
11
- shadowOpacity: 0,
12
- shadowRadius: 0,
13
- elevation: 0,
14
- },
15
- shadow0: {
16
- shadowColor: '#000',
17
- shadowOffset: {
18
- width: 0,
19
- height: 1,
20
- },
21
- shadowOpacity: 0.18,
22
- shadowRadius: 1.0,
23
- elevation: 1,
24
- },
1
+ export const SHADOW = {
25
2
  shadow1: {
26
3
  shadowColor: '#000',
27
4
  shadowOffset: {
@@ -32,127 +9,4 @@ exports.SHADOW = {
32
9
  shadowRadius: 1.41,
33
10
  elevation: 2,
34
11
  },
35
- shadow2: {
36
- shadowColor: '#000',
37
- shadowOffset: {
38
- width: 0,
39
- height: 1,
40
- },
41
- shadowOpacity: 0.22,
42
- shadowRadius: 0.8,
43
- elevation: 3,
44
- },
45
- shadow3: {
46
- shadowColor: '#000',
47
- shadowOffset: {
48
- width: 0,
49
- height: 2,
50
- },
51
- shadowOpacity: 0.23,
52
- shadowRadius: 2.62,
53
- elevation: 4,
54
- },
55
- shadow4: {
56
- shadowColor: '#000',
57
- shadowOffset: {
58
- width: 0,
59
- height: 2,
60
- },
61
- shadowOpacity: 0.25,
62
- shadowRadius: 3.84,
63
- elevation: 5,
64
- },
65
- shadow5: {
66
- shadowColor: '#000',
67
- shadowOffset: {
68
- width: 0,
69
- height: 3,
70
- },
71
- shadowOpacity: 0.27,
72
- shadowRadius: 4.65,
73
- elevation: 6,
74
- },
75
- shadow6: {
76
- shadowColor: '#000',
77
- shadowOffset: {
78
- width: 0,
79
- height: 3,
80
- },
81
- shadowOpacity: 0.29,
82
- shadowRadius: 4.65,
83
- elevation: 7,
84
- },
85
- shadow7: {
86
- shadowColor: '#000',
87
- shadowOffset: {
88
- width: 0,
89
- height: 4,
90
- },
91
- shadowOpacity: 0.3,
92
- shadowRadius: 4.65,
93
- elevation: 8,
94
- },
95
- shadow8: {
96
- shadowColor: '#000',
97
- shadowOffset: {
98
- width: 0,
99
- height: 4,
100
- },
101
- shadowOpacity: 0.32,
102
- shadowRadius: 5.46,
103
- elevation: 9,
104
- },
105
- shadow9: {
106
- shadowColor: '#000',
107
- shadowOffset: {
108
- width: 0,
109
- height: 5,
110
- },
111
- shadowOpacity: 0.34,
112
- shadowRadius: 6.27,
113
- elevation: 10,
114
- },
115
- shadow10: {
116
- shadowColor: '#C3C3C3',
117
- shadowOffset: { width: 0, height: 0 },
118
- shadowOpacity: 0.3,
119
- shadowRadius: 5,
120
- elevation: 5,
121
- },
122
- shadow11: {
123
- shadowColor: '#3683BC',
124
- shadowOffset: {
125
- width: 1,
126
- height: 1,
127
- },
128
- shadowOpacity: 0.3,
129
- shadowRadius: 1,
130
- elevation: 1,
131
- },
132
- shadow12: {
133
- shadowColor: '#000',
134
- shadowOffset: {
135
- width: 1,
136
- height: 1,
137
- },
138
- shadowOpacity: 0.1,
139
- shadowRadius: 3,
140
- elevation: 5,
141
- },
142
- containerShadow: {
143
- shadowOffset: { width: 2, height: 1 },
144
- shadowOpacity: 0.5,
145
- shadowRadius: 6,
146
- elevation: 5,
147
- },
148
- shadow13: {
149
- shadowColor: '#3683BC',
150
- shadowOffset: {
151
- width: 1,
152
- height: 1,
153
- },
154
- shadowOpacity: 0.005,
155
- shadowRadius: 3,
156
- elevation: 1,
157
- },
158
12
  };
@@ -1,8 +1,4 @@
1
1
  export declare const SPACING: {
2
- none: number;
3
- s1: number;
4
- s2: number;
5
- s3: number;
6
2
  s4: number;
7
3
  s6: number;
8
4
  s8: number;
@@ -10,14 +6,6 @@ export declare const SPACING: {
10
6
  s12: number;
11
7
  s14: number;
12
8
  s16: number;
13
- s18: number;
14
9
  s20: number;
15
- s22: number;
16
- s24: number;
17
- s30: number;
18
- s36: number;
19
- s40: number;
20
10
  s45: number;
21
- s48: number;
22
- s50: number;
23
11
  };
@@ -1,11 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SPACING = void 0;
4
- exports.SPACING = {
5
- none: 0,
6
- s1: 1,
7
- s2: 2,
8
- s3: 3,
1
+ export const SPACING = {
9
2
  s4: 4,
10
3
  s6: 6,
11
4
  s8: 8,
@@ -13,14 +6,6 @@ exports.SPACING = {
13
6
  s12: 12,
14
7
  s14: 14,
15
8
  s16: 16,
16
- s18: 18,
17
9
  s20: 20,
18
- s22: 22,
19
- s24: 24,
20
- s30: 30,
21
- s36: 36,
22
- s40: 40,
23
- s45: 45,
24
- s48: 48,
25
- s50: 50,
10
+ s45: 45
26
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rn-components-dropdown/dropdown",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "homepage": "https://www.npmjs.com/package/@rn-components-dropdown/dropdown",
@@ -1,4 +1,3 @@
1
- /* eslint-disable react-hooks/exhaustive-deps */
2
1
  import {
3
2
  View,
4
3
  Modal,
@@ -16,8 +15,7 @@ import React, { useCallback } from 'react';
16
15
  import useDropdown from './hooks/useDropdown';
17
16
  import SvgButton from '../svgButton/SvgButton';
18
17
  import { useDropdownStyle } from './DropdownStyle';
19
- import CheckIcon from '../../assets/svg/CheckIcon';
20
- import { ArrowDown, ArrowUp } from '../../assets/svg';
18
+ import { ArrowDown, ArrowUp, CheckIcon } from '../../assets/svg';
21
19
  import SearchInput from './component/input/TextInput';
22
20
  import { DropdownProps } from './interface/DropdownInterface';
23
21
 
@@ -47,7 +45,6 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
47
45
  maxHeight = 300,
48
46
  inverted = true,
49
47
  renderRightIcon,
50
- backgroundColor,
51
48
  placeholderStyle,
52
49
  inputSearchStyle,
53
50
  searchPlaceholder,
@@ -251,19 +248,22 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
251
248
  );
252
249
  },
253
250
  [
254
- font,
255
- colors,
256
- styles,
257
- labelField,
258
- renderItem,
259
- valueField,
260
- activeColor,
261
251
  currentValue,
262
- itemTextStyle,
263
252
  itemTestIDField,
253
+ labelField,
264
254
  accessibilityLabel,
265
- itemContainerStyle,
266
255
  itemAccessibilityLabelField,
256
+ activeColor,
257
+ itemContainerStyle,
258
+ renderItem,
259
+ valueField,
260
+ styles,
261
+ multiSelectIcon,
262
+ colors,
263
+ checkIconColor,
264
+ itemTextStyle,
265
+ font,
266
+ onCheckPress,
267
267
  ],
268
268
  );
269
269
 
@@ -307,7 +307,6 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
307
307
  },
308
308
  [
309
309
  font,
310
- colors,
311
310
  styles,
312
311
  onSelect,
313
312
  labelField,
@@ -358,16 +357,17 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
358
357
  return null;
359
358
  }, [
360
359
  search,
360
+ renderInputSearch,
361
+ onChangeText,
362
+ onSearch,
363
+ setSearchText,
364
+ searchText,
361
365
  testID,
362
366
  colors,
363
367
  styles,
364
- onSearch,
365
- searchText,
366
- onChangeText,
367
368
  inputSearchStyle,
368
- renderInputSearch,
369
- searchPlaceholder,
370
369
  accessibilityLabel,
370
+ searchPlaceholder,
371
371
  ]);
372
372
 
373
373
  const _renderList = useCallback(
@@ -405,16 +405,19 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
405
405
  );
406
406
  },
407
407
  [
408
- styles,
409
- testID,
410
408
  inverted,
411
- listData,
412
- scrollIndex,
409
+ styles,
413
410
  renderSearch,
411
+ refList,
412
+ listData,
414
413
  flatListProps,
415
- renderCheckItem,
414
+ testID,
415
+ scrollIndex,
416
416
  accessibilityLabel,
417
417
  showsVerticalScrollIndicator,
418
+ selectionType,
419
+ _renderItem,
420
+ renderCheckItem,
418
421
  ],
419
422
  );
420
423
 
@@ -513,7 +516,6 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
513
516
  _renderList,
514
517
  keyboardHeight,
515
518
  containerStyle,
516
- backgroundColor,
517
519
  dropdownPosition,
518
520
  keyboardAvoiding,
519
521
  ]);
@@ -534,7 +536,7 @@ const DropdownComponent = <T, Mode extends 'single' | 'multi'>(
534
536
  <View style={styles.mainContainer}>
535
537
  {_renderLabel()}
536
538
  <View
537
- ref={ref}
539
+ ref={ref as any}
538
540
  onLayout={onMeasure}
539
541
  style={StyleSheet.flatten([styles.mainWrap, style])}
540
542
  >
@@ -18,9 +18,9 @@ import _ from 'lodash';
18
18
  import { useDetectDevice } from './useDetectDevice';
19
19
  import { useDeviceOrientation } from './useOrientation';
20
20
  import { SCREEN_HEIGHT, SCREEN_WIDTH } from '../../../style';
21
- import { DropdownProps } from '../interface/DropdownInterface';
21
+ import { DropdownProps, SELECTIONS_TYPE } from '../interface/DropdownInterface';
22
22
 
23
- const useDropdown = <T, Mode extends 'single' | 'multi'>(
23
+ const useDropdown = <T, Mode extends SELECTIONS_TYPE>(
24
24
  props: DropdownProps<T, Mode>,
25
25
  ) => {
26
26
  const {
@@ -103,7 +103,18 @@ const useDropdown = <T, Mode extends 'single' | 'multi'>(
103
103
 
104
104
  const onMeasure = useCallback(() => {
105
105
  if (ref && ref?.current) {
106
- ref.current.measureInWindow((pageX, pageY, width, height) => {
106
+ (
107
+ ref?.current as unknown as {
108
+ measureInWindow: (
109
+ callback: (
110
+ x: number,
111
+ y: number,
112
+ width: number,
113
+ height: number,
114
+ ) => void,
115
+ ) => void;
116
+ }
117
+ )?.measureInWindow((pageX, pageY, width, height) => {
107
118
  let isFull = isTablet
108
119
  ? false
109
120
  : mode === 'modal' || orientation === 'LANDSCAPE';
@@ -15,9 +15,9 @@ export type IDropdownRef = {
15
15
  close: () => void;
16
16
  };
17
17
 
18
- export type SelectionType = 'single' | 'multi';
18
+ export type SELECTIONS_TYPE = 'single' | 'multi';
19
19
 
20
- export type DropdownProps<S, T extends SelectionType> = {
20
+ export type DropdownProps<S, T extends SELECTIONS_TYPE> = {
21
21
  data: S[];
22
22
  testID?: string;
23
23
  search?: boolean;
@@ -63,7 +63,7 @@ export type DropdownProps<S, T extends SelectionType> = {
63
63
  placeholderStyle?: StyleProp<TextStyle>;
64
64
  inputSearchStyle?: StyleProp<TextStyle>;
65
65
  onChangeText?: (search: string) => void;
66
- onConfirmSelectItem?: (item: T) => void;
66
+ onConfirmSelectItem?: (item: S) => void;
67
67
  selectedTextStyle?: StyleProp<TextStyle>;
68
68
  itemContainerStyle?: StyleProp<ViewStyle>;
69
69
  dropdownPosition?: 'auto' | 'top' | 'bottom';
@@ -83,7 +83,7 @@ export type DropdownProps<S, T extends SelectionType> = {
83
83
  ) => React.JSX.Element | null | undefined;
84
84
  onChange?: (
85
85
  selecteValue?: keyof S,
86
- selectedList?: SelectionType extends 'single' | 'multi' ? S[] : S,
86
+ selectedList?: SELECTIONS_TYPE extends 'single' | 'multi' ? S[] : S,
87
87
  ) => void;
88
88
  };
89
89
 
@@ -22,9 +22,6 @@ const AppText = ({
22
22
  }: props) => {
23
23
  const family = fontFamily;
24
24
  const styles = useAppTextStyle({
25
- style: {
26
- fontFamily: family,
27
- },
28
25
  size,
29
26
  color,
30
27
  type,
@@ -11,7 +11,6 @@ interface props {
11
11
 
12
12
  export const useAppTextStyle = ({
13
13
  size,
14
- style,
15
14
  color,
16
15
  type = 'normal',
17
16
  }: props) => {
@@ -22,13 +21,12 @@ export const useAppTextStyle = ({
22
21
  container: {
23
22
  fontSize: size || 14,
24
23
  color: type === 'error' ? colors.error : color ? color : colors.primary,
25
- ...style,
26
24
  },
27
25
  require: {
28
26
  color: colors.error,
29
27
  },
30
28
  });
31
- }, [size, colors, style, type, color]);
29
+ }, [size, colors, type, color]);
32
30
 
33
31
  return styles;
34
32
  };
@@ -3,38 +3,39 @@ import { View } from 'react-native';
3
3
  import AppText from '../../components/text/AppText';
4
4
  import {
5
5
  DropdownProps,
6
- SelectionType,
6
+ SELECTIONS_TYPE,
7
7
  } from '../../components/dropdown/interface/DropdownInterface';
8
8
  import DropdownComponent from '../../components/dropdown/Dropdown';
9
9
  import { useDropdownControllerStyle } from './DropdownControllerStyle';
10
10
  import { Control, Controller, FieldValues, Path } from 'react-hook-form';
11
11
 
12
- type DropControllerProps<S, T extends SelectionType, U extends FieldValues> = {
12
+ interface DropControllerProps<
13
+ U extends FieldValues,
14
+ S,
15
+ T extends SELECTIONS_TYPE = 'single',
16
+ > extends DropdownProps<S, T> {
13
17
  control: Control<U>;
14
18
  controller: Path<U>;
15
- dropProps: DropdownProps<S, T>;
16
- };
19
+ }
17
20
 
18
21
  const AppDropdownController = <
19
- S,
20
- T extends SelectionType,
21
22
  U extends FieldValues,
23
+ S,
24
+ T extends SELECTIONS_TYPE = 'single',
22
25
  >(
23
- props: DropControllerProps<S, T, U>,
26
+ props: DropControllerProps<U, S, T>,
24
27
  ) => {
25
28
  const {
29
+ data,
30
+ label,
26
31
  control,
32
+ labelField,
27
33
  controller,
28
- dropProps: {
29
- data,
30
- label,
31
- labelField,
32
- valueField,
33
- placeholder,
34
- selectionType,
35
- containerStyle,
36
- ...rest
37
- },
34
+ valueField,
35
+ placeholder,
36
+ selectionType,
37
+ containerStyle,
38
+ ...rest
38
39
  } = props;
39
40
 
40
41
  const { styles } = useDropdownControllerStyle();