@dartech/arsenal-ui 1.4.72 → 1.4.74

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +18 -27
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -903,20 +903,12 @@ const ControlAutocomplete = _a => {
903
903
  helperText: !hideErrorMessage && (error === null || error === void 0 ? void 0 : error.message),
904
904
  FormHelperTextProps: {
905
905
  variant: 'standard'
906
- }
907
- }, startAdornment ? {
908
- InputProps: Object.assign(Object.assign({}, params.InputProps), {
909
- startAdornment: jsxs(Fragment, {
910
- children: [startAdornment, params.InputProps.startAdornment]
911
- })
912
- })
913
- } : {}, endAdornment ? {
906
+ },
914
907
  InputProps: Object.assign(Object.assign({}, params.InputProps), {
915
- endAdornment: jsxs(Fragment, {
916
- children: [endAdornment, params.InputProps.endAdornment]
917
- })
908
+ startAdornment: startAdornment ? startAdornment : params.InputProps.startAdornment,
909
+ endAdornment: endAdornment ? endAdornment : params.InputProps.endAdornment
918
910
  })
919
- } : {}, textFieldProps));
911
+ }, textFieldProps));
920
912
  }
921
913
  }, autocompleteProps));
922
914
  };
@@ -1066,7 +1058,7 @@ function ControlQueryAutocomplete(_a) {
1066
1058
  }
1067
1059
  }, [data, options]);
1068
1060
  const handleOpen = () => {
1069
- setOpen(true);
1061
+ if (options.length) setOpen(true);
1070
1062
  };
1071
1063
  const handleClose = () => {
1072
1064
  setOpen(false);
@@ -1120,20 +1112,19 @@ function ControlQueryAutocomplete(_a) {
1120
1112
  FormHelperTextProps: {
1121
1113
  variant: 'standard'
1122
1114
  },
1123
- InputProps: Object.assign(Object.assign(Object.assign({}, params.InputProps), {
1124
- endAdornment: endAdornment ? jsxs(React.Fragment, {
1125
- children: [isFetching ? jsx(CircularProgress, {
1126
- color: "inherit",
1127
- size: 20
1128
- }) : null, params.InputProps.endAdornment]
1129
- }) : jsxs(Fragment, {
1130
- children: [endAdornment, params.InputProps.startAdornment]
1131
- })
1132
- }), startAdornment ? {
1133
- startAdornment: jsxs(Fragment, {
1134
- children: [startAdornment, params.InputProps.startAdornment]
1135
- })
1136
- } : {})
1115
+ InputProps: Object.assign(Object.assign({}, params.InputProps), {
1116
+ endAdornment: endAdornment ? endAdornment : jsxs(React.Fragment, {
1117
+ children: [isFetching ? jsx(InputAdornment, Object.assign({
1118
+ position: "end"
1119
+ }, {
1120
+ children: jsx(CircularProgress, {
1121
+ color: "inherit",
1122
+ size: 20
1123
+ })
1124
+ })) : null, params.InputProps.endAdornment]
1125
+ }),
1126
+ startAdornment: startAdornment ? startAdornment : params.InputProps.startAdornment
1127
+ })
1137
1128
  }, textFieldProps))
1138
1129
  }, autocompleteProps));
1139
1130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dartech/arsenal-ui",
3
- "version": "1.4.72",
3
+ "version": "1.4.74",
4
4
  "author": "DAR",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"