@availity/mui-autocomplete 1.2.3 → 1.2.4
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/CHANGELOG.md +7 -0
- package/dist/index.js +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +3 -2
- package/src/lib/OrganizationAutocomplete.tsx +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.2.4](https://github.com/Availity/element/compare/@availity/mui-autocomplete@1.2.3...@availity/mui-autocomplete@1.2.4) (2025-06-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **mui-autocomplete:** serialize organization params ([23d9dce](https://github.com/Availity/element/commit/23d9dce0bd63e9417a8a79a95ab2c7e5c8946301))
|
|
11
|
+
|
|
5
12
|
## [1.2.3](https://github.com/Availity/element/compare/@availity/mui-autocomplete@1.2.2...@availity/mui-autocomplete@1.2.3) (2025-05-30)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.js
CHANGED
|
@@ -281,9 +281,15 @@ var CodesAutocomplete = (_a) => {
|
|
|
281
281
|
|
|
282
282
|
// src/lib/OrganizationAutocomplete.tsx
|
|
283
283
|
var import_api_axios2 = require("@availity/api-axios");
|
|
284
|
+
var import_qs = __toESM(require("qs"));
|
|
284
285
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
285
286
|
var fetchOrgs = (config) => __async(void 0, null, function* () {
|
|
286
|
-
const
|
|
287
|
+
const configWithParamsSerializer = __spreadProps(__spreadValues({}, config), {
|
|
288
|
+
paramsSerializer: {
|
|
289
|
+
serialize: (params) => import_qs.default.stringify(params, { arrayFormat: "repeat" })
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
const resp = yield import_api_axios2.avOrganizationsApi.getOrganizations(configWithParamsSerializer);
|
|
287
293
|
return {
|
|
288
294
|
options: resp.data.organizations,
|
|
289
295
|
hasMore: config.params.offset + config.params.limit < resp.data.totalCount,
|
package/dist/index.mjs
CHANGED
|
@@ -239,9 +239,15 @@ var CodesAutocomplete = (_a) => {
|
|
|
239
239
|
|
|
240
240
|
// src/lib/OrganizationAutocomplete.tsx
|
|
241
241
|
import { avOrganizationsApi } from "@availity/api-axios";
|
|
242
|
+
import qs from "qs";
|
|
242
243
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
243
244
|
var fetchOrgs = (config) => __async(void 0, null, function* () {
|
|
244
|
-
const
|
|
245
|
+
const configWithParamsSerializer = __spreadProps(__spreadValues({}, config), {
|
|
246
|
+
paramsSerializer: {
|
|
247
|
+
serialize: (params) => qs.stringify(params, { arrayFormat: "repeat" })
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
const resp = yield avOrganizationsApi.getOrganizations(configWithParamsSerializer);
|
|
245
251
|
return {
|
|
246
252
|
options: resp.data.organizations,
|
|
247
253
|
hasMore: config.params.offset + config.params.limit < resp.data.totalCount,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-autocomplete",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "Availity MUI Autocomplete Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@mui/types": "^7.2.21"
|
|
44
|
+
"@mui/types": "^7.2.21",
|
|
45
|
+
"qs": "^6.14.0"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
48
|
"@availity/api-axios": "^11.0.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { avOrganizationsApi, ApiConfig } from '@availity/api-axios';
|
|
2
2
|
import type { ChipTypeMap } from '@mui/material/Chip';
|
|
3
|
+
import qs from 'qs';
|
|
3
4
|
|
|
4
5
|
import { AsyncAutocomplete, AsyncAutocompleteProps } from './AsyncAutocomplete';
|
|
5
6
|
import type { Optional } from './util';
|
|
@@ -15,7 +16,15 @@ export type Organization = {
|
|
|
15
16
|
export const fetchOrgs = async (
|
|
16
17
|
config: ApiConfig
|
|
17
18
|
): Promise<{ options: Organization[]; hasMore: boolean; offset: number }> => {
|
|
18
|
-
|
|
19
|
+
// Configure axios to use 'repeat' format for arrays (no brackets)
|
|
20
|
+
const configWithParamsSerializer = {
|
|
21
|
+
...config,
|
|
22
|
+
paramsSerializer: {
|
|
23
|
+
serialize: (params: Record<string, any>) => qs.stringify(params, { arrayFormat: 'repeat' }),
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const resp = await avOrganizationsApi.getOrganizations(configWithParamsSerializer);
|
|
19
28
|
|
|
20
29
|
return {
|
|
21
30
|
options: resp.data.organizations as Organization[],
|