@fixefy/fixefy-ui-components 0.2.39 → 0.2.41
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.
|
@@ -28,5 +28,6 @@ export type AsyncDropdownPropsType = {
|
|
|
28
28
|
isInitialOpen?: boolean;
|
|
29
29
|
placeholder?: string;
|
|
30
30
|
rootStyle?: any;
|
|
31
|
+
options_path?: string;
|
|
31
32
|
};
|
|
32
33
|
export declare const FxAsyncDropdown: React.ForwardRefExoticComponent<Omit<AsyncDropdownPropsType, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -120,7 +120,7 @@ const checkedIcon = /*#__PURE__*/ (0, _jsxruntime.jsx)(_iconsmaterial.CheckBox,
|
|
|
120
120
|
fontSize: "small"
|
|
121
121
|
});
|
|
122
122
|
const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
123
|
-
const { onAdd, onRemoveOne, onRemoveAll, fetcher, disabled, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, logo_placeholder, logo_folder_name } = props;
|
|
123
|
+
const { onAdd, onRemoveOne, onRemoveAll, fetcher, disabled, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, logo_placeholder, logo_folder_name, options_path } = props;
|
|
124
124
|
const ref = (0, _react.useRef)(null);
|
|
125
125
|
const theme = (0, _material.useTheme)();
|
|
126
126
|
const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
|
|
@@ -183,7 +183,7 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
|
|
|
183
183
|
]);
|
|
184
184
|
(0, _react.useEffect)(()=>{
|
|
185
185
|
if (data && !isLastPage && prevPage < page) {
|
|
186
|
-
const newOptions =
|
|
186
|
+
const newOptions = options_path ? (0, _helpers.getJPart)(data, options_path) : (0, _helpers.getJPart)(data, method_name);
|
|
187
187
|
if (newOptions == null || newOptions.length < pageSize) {
|
|
188
188
|
setIsLastPage(true);
|
|
189
189
|
}
|
package/package.json
CHANGED