@fixefy/fixefy-ui-components 0.2.40 → 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,9 +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 = method_name == 'workspace' ? data.workspace[search_path === null || search_path === void 0 ? void 0 : search_path.split('.')[1]] : (0, _helpers.getJPart)(data, method_name);
187
- //TODO: SHOULD ADD ANOTHER VARIABLE FOR THE PATH AND INSTEAD OF THE CURRENT newOptions, USE THE getJPart WITH THE PATH:
188
- // const newOptions: Option[] = getJPart(data, PATH)
186
+ const newOptions = options_path ? (0, _helpers.getJPart)(data, options_path) : (0, _helpers.getJPart)(data, method_name);
189
187
  if (newOptions == null || newOptions.length < pageSize) {
190
188
  setIsLastPage(true);
191
189
  }
package/package.json CHANGED
@@ -65,5 +65,5 @@
65
65
  "require": "./dist/index.js"
66
66
  }
67
67
  },
68
- "version": "0.2.40"
68
+ "version": "0.2.41"
69
69
  }