@fixefy/fixefy-ui-components 0.3.55 → 0.3.56
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.
|
@@ -112,6 +112,7 @@ function _object_spread_props(target, source) {
|
|
|
112
112
|
return target;
|
|
113
113
|
}
|
|
114
114
|
const FxAsyncDropdown = (props)=>{
|
|
115
|
+
var _fetcher_query, _fetcher_query_loc_source, _fetcher_query_loc, _fetcher_query1;
|
|
115
116
|
const { onAdd, onRemoveAll, onUnselectAll, fetcher, disabled, defaultValue, type = 'text', variables, search_path, modal_type, multiple, name, query, isInitialOpen, placeholder, title_path, rootStylesOverride, options_path, _id } = props;
|
|
116
117
|
const ref = (0, _react.useRef)(null);
|
|
117
118
|
const { method_name } = variables !== null && variables !== void 0 ? variables : {};
|
|
@@ -119,6 +120,7 @@ const FxAsyncDropdown = (props)=>{
|
|
|
119
120
|
const { where, sort } = (_fetcher_queryOptions_variables = fetcher.queryOptions.variables) !== null && _fetcher_queryOptions_variables !== void 0 ? _fetcher_queryOptions_variables : {};
|
|
120
121
|
var _parseCookies;
|
|
121
122
|
const { ws } = (_parseCookies = (0, _nookies.parseCookies)()) !== null && _parseCookies !== void 0 ? _parseCookies : {};
|
|
123
|
+
const isLocal = fetcher === null || fetcher === void 0 ? void 0 : (_fetcher_query = fetcher.query) === null || _fetcher_query === void 0 ? void 0 : _fetcher_query.loc;
|
|
122
124
|
const [defaultValueWhere, setDefaultValueWhere] = (0, _react.useState)(where);
|
|
123
125
|
const [displayed, setDisplayed] = (0, _react.useState)(multiple ? [] : '');
|
|
124
126
|
const [options, setOptions] = (0, _react.useState)([]);
|
|
@@ -153,7 +155,7 @@ const FxAsyncDropdown = (props)=>{
|
|
|
153
155
|
setPage((prevPage)=>prevPage + 1);
|
|
154
156
|
setPrevPage((prevPage)=>prevPage + 1);
|
|
155
157
|
};
|
|
156
|
-
const [fetch, { data, loading }] = (0, _client.useLazyQuery)((0, _graphqltag.gql)(fetcher.query), _object_spread_props(_object_spread({}, fetcher.queryOptions), {
|
|
158
|
+
const [fetch, { data, loading }] = (0, _client.useLazyQuery)((0, _graphqltag.gql)(isLocal ? fetcher === null || fetcher === void 0 ? void 0 : (_fetcher_query1 = fetcher.query) === null || _fetcher_query1 === void 0 ? void 0 : (_fetcher_query_loc = _fetcher_query1.loc) === null || _fetcher_query_loc === void 0 ? void 0 : (_fetcher_query_loc_source = _fetcher_query_loc.source) === null || _fetcher_query_loc_source === void 0 ? void 0 : _fetcher_query_loc_source.body : fetcher.query), _object_spread_props(_object_spread({}, fetcher.queryOptions), {
|
|
157
159
|
variables: {
|
|
158
160
|
where: getWhere(),
|
|
159
161
|
skip: page * pageSize - pageSize,
|
package/package.json
CHANGED