@evoke-platform/ui-components 1.1.0-testing.3 → 1.1.0-testing.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/dist/published/components/custom/Form/FormComponents/ObjectComponent/ObjectPropertyInput.js +7 -3
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/ManyToMany/DropdownRepeatableField.js +6 -2
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/ManyToMany/DropdownRepeatableFieldInput.js +1 -0
- package/dist/published/components/custom/Form/utils.js +1 -1
- package/package.json +2 -2
package/dist/published/components/custom/Form/FormComponents/ObjectComponent/ObjectPropertyInput.js
CHANGED
@@ -78,7 +78,11 @@ export const ObjectPropertyInput = (props) => {
|
|
78
78
|
updatedFilter = {};
|
79
79
|
}
|
80
80
|
updatedFilter.limit = 100;
|
81
|
-
|
81
|
+
const { propertyId, direction } = layout?.sort ?? {
|
82
|
+
propertyId: 'name',
|
83
|
+
direction: 'asc',
|
84
|
+
};
|
85
|
+
updatedFilter.order = `${propertyId} ${direction}`;
|
82
86
|
const where = name
|
83
87
|
? transformToWhere({
|
84
88
|
name: {
|
@@ -103,7 +107,7 @@ export const ObjectPropertyInput = (props) => {
|
|
103
107
|
setLoadingOptions(false);
|
104
108
|
}
|
105
109
|
});
|
106
|
-
}, [relatedObject, setLoadingOptions, setOptions, property, filter]);
|
110
|
+
}, [relatedObject, setLoadingOptions, setOptions, property, filter, layout]);
|
107
111
|
useEffect(() => {
|
108
112
|
if (displayOption === 'dropdown') {
|
109
113
|
getDropdownOptions();
|
@@ -281,7 +285,7 @@ export const ObjectPropertyInput = (props) => {
|
|
281
285
|
caretColor: 'white',
|
282
286
|
}
|
283
287
|
: {}),
|
284
|
-
} })), readOnly: !loadingOptions && !canUpdateProperty, error: error }))) : (React.createElement(Box, { sx: {
|
288
|
+
} })), readOnly: !loadingOptions && !canUpdateProperty, error: error, sortBy: "NONE" }))) : (React.createElement(Box, { sx: {
|
285
289
|
padding: (instance?.[property.id]?.name ?? selectedInstance?.name)
|
286
290
|
? '16.5px 14px'
|
287
291
|
: '10.5px 0',
|
@@ -78,9 +78,13 @@ export const DropdownRepeatableField = (props) => {
|
|
78
78
|
setLoading(true);
|
79
79
|
const endObjectProperty = middleObject.properties?.find((currProperty) => property.manyToManyPropertyId === currProperty.id);
|
80
80
|
if (endObjectProperty?.objectId) {
|
81
|
+
const { propertyId, direction } = layout?.sort ?? {
|
82
|
+
propertyId: 'name',
|
83
|
+
direction: 'asc',
|
84
|
+
};
|
81
85
|
const filter = {
|
82
86
|
limit: 100,
|
83
|
-
order:
|
87
|
+
order: `${propertyId} ${direction}`,
|
84
88
|
};
|
85
89
|
let searchCriteria = criteria && !isEmpty(criteria) ? transformToWhere(criteria) : {};
|
86
90
|
if (searchedName?.length) {
|
@@ -106,7 +110,7 @@ export const DropdownRepeatableField = (props) => {
|
|
106
110
|
});
|
107
111
|
}
|
108
112
|
}
|
109
|
-
}, [property.objectId, property.manyToManyPropertyId, apiServices, middleObject]);
|
113
|
+
}, [property.objectId, property.manyToManyPropertyId, apiServices, middleObject, layout]);
|
110
114
|
const debouncedEndObjectSearch = useCallback(debounce(fetchEndObjectInstances, 500), [fetchEndObjectInstances]);
|
111
115
|
useEffect(() => {
|
112
116
|
debouncedEndObjectSearch(searchValue);
|
@@ -86,6 +86,7 @@ export const DropdownRepeatableFieldInput = (props) => {
|
|
86
86
|
setSearchValue(event.target.value);
|
87
87
|
} })),
|
88
88
|
loading: loading,
|
89
|
+
sortBy: 'NONE',
|
89
90
|
} }),
|
90
91
|
React.createElement(Snackbar, { open: snackbarError.showAlert, handleClose: () => setSnackbarError({ isError: snackbarError.isError, showAlert: false }), message: snackbarError.message, error: snackbarError.isError })))) : (React.createElement(Typography, null, selectedOptions && selectedOptions.map((option) => option.label).join(', ')))));
|
91
92
|
};
|
@@ -384,7 +384,7 @@ export function convertComponentsToForm(components) {
|
|
384
384
|
...(component.orderBy ? { sortBy: component.orderBy } : {}),
|
385
385
|
}
|
386
386
|
: isArray(component.initialValue)
|
387
|
-
? component.initialValue.map((c) => c.value)
|
387
|
+
? component.initialValue.map((c) => typeof c === 'string' ? c : c.value)
|
388
388
|
: component.initialValue?.value
|
389
389
|
? component.initialValue?.value
|
390
390
|
: component.initialValue,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evoke-platform/ui-components",
|
3
|
-
"version": "1.1.0-testing.
|
3
|
+
"version": "1.1.0-testing.4",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/published/index.js",
|
6
6
|
"module": "dist/published/index.js",
|
@@ -94,7 +94,7 @@
|
|
94
94
|
"@dnd-kit/sortable": "^7.0.1",
|
95
95
|
"@emotion/react": "^11.13.5",
|
96
96
|
"@emotion/styled": "^11.8.1",
|
97
|
-
"@evoke-platform/context": "^1.0.0-dev.
|
97
|
+
"@evoke-platform/context": "^1.0.0-dev.126",
|
98
98
|
"@formio/react": "^5.2.4-rc.1",
|
99
99
|
"@js-joda/core": "^3.2.0",
|
100
100
|
"@js-joda/locale_en-us": "^3.2.2",
|