aq-fe-framework 0.1.431 → 0.1.433
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.
@@ -644,7 +644,8 @@ function MySelectFromAPI(_a) {
|
|
644
644
|
onChange,
|
645
645
|
value,
|
646
646
|
setObjectData,
|
647
|
-
autoSelectFirstItem
|
647
|
+
autoSelectFirstItem,
|
648
|
+
queryOptions
|
648
649
|
} = _b, rest = __objRest(_b, [
|
649
650
|
"queryKey",
|
650
651
|
"axiosFn",
|
@@ -653,9 +654,10 @@ function MySelectFromAPI(_a) {
|
|
653
654
|
"onChange",
|
654
655
|
"value",
|
655
656
|
"setObjectData",
|
656
|
-
"autoSelectFirstItem"
|
657
|
+
"autoSelectFirstItem",
|
658
|
+
"queryOptions"
|
657
659
|
]);
|
658
|
-
const query = useMyReactQuery({ queryKey, axiosFn });
|
660
|
+
const query = useMyReactQuery({ queryKey, axiosFn, options: __spreadValues({}, queryOptions) });
|
659
661
|
const hasAutoSelected = useRef(false);
|
660
662
|
const getLabel = useCallback(
|
661
663
|
(item) => {
|
package/dist/core/index.d.mts
CHANGED
@@ -6,7 +6,7 @@ import { M as MyApiResponse } from '../createBaseApi-D9OK2lA_.mjs';
|
|
6
6
|
import { AxiosResponse } from 'axios';
|
7
7
|
import { UseFormReturnType } from '@mantine/form';
|
8
8
|
import { useDisclosure } from '@mantine/hooks';
|
9
|
-
import { UseQueryResult, QueryKey } from '@tanstack/react-query';
|
9
|
+
import { UseQueryResult, QueryKey, UseQueryOptions } from '@tanstack/react-query';
|
10
10
|
import { MRT_RowData, MRT_ColumnDef } from 'mantine-react-table';
|
11
11
|
import { RichTextEditorProps, RichTextEditorToolbarProps, RichTextEditorContentProps } from '@mantine/tiptap';
|
12
12
|
import { I as IBaseEntity } from '../IBaseEntity-BprRafT5.mjs';
|
@@ -105,15 +105,16 @@ interface MySelectProps extends SelectProps {
|
|
105
105
|
}
|
106
106
|
declare function MySelect({ label, data, isLoading, isError, ...rest }: MySelectProps): react_jsx_runtime.JSX.Element;
|
107
107
|
|
108
|
-
interface MySelectFromAPIProps<IRes extends IBaseEntity, IBody = any> extends
|
108
|
+
interface MySelectFromAPIProps<IRes extends IBaseEntity, IBody = any> extends MySelectProps {
|
109
109
|
queryKey: QueryKey;
|
110
110
|
axiosFn: () => Promise<AxiosResponse<MyApiResponse<IRes[]>, IBody>>;
|
111
111
|
labelWithCode?: boolean;
|
112
|
+
queryOptions?: UseQueryOptions<IRes[], Error>;
|
112
113
|
getOptionLabel?: (item: IRes) => string;
|
113
114
|
setObjectData?: (item: IRes | undefined) => void;
|
114
115
|
autoSelectFirstItem?: boolean;
|
115
116
|
}
|
116
|
-
declare function MySelectFromAPI<IRes extends IBaseEntity, IBody = any>({ queryKey, axiosFn, labelWithCode, getOptionLabel, onChange, value, setObjectData, autoSelectFirstItem, ...rest }: MySelectFromAPIProps<IRes, IBody>): react_jsx_runtime.JSX.Element;
|
117
|
+
declare function MySelectFromAPI<IRes extends IBaseEntity, IBody = any>({ queryKey, axiosFn, labelWithCode, getOptionLabel, onChange, value, setObjectData, autoSelectFirstItem, queryOptions, ...rest }: MySelectFromAPIProps<IRes, IBody>): react_jsx_runtime.JSX.Element;
|
117
118
|
|
118
119
|
interface CoreTextInputProps extends TextInputProps {
|
119
120
|
label?: string;
|
package/dist/core/index.mjs
CHANGED