aq-fe-framework 0.1.416 → 0.1.417
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.
@@ -630,10 +630,12 @@ import { jsx as jsx12 } from "react/jsx-runtime";
|
|
630
630
|
function MySelectFromAPI(_a) {
|
631
631
|
var _b = _a, {
|
632
632
|
queryKey,
|
633
|
-
axiosFn
|
633
|
+
axiosFn,
|
634
|
+
labelWithCode
|
634
635
|
} = _b, rest = __objRest(_b, [
|
635
636
|
"queryKey",
|
636
|
-
"axiosFn"
|
637
|
+
"axiosFn",
|
638
|
+
"labelWithCode"
|
637
639
|
]);
|
638
640
|
const query = useMyReactQuery({
|
639
641
|
queryKey,
|
@@ -646,7 +648,7 @@ function MySelectFromAPI(_a) {
|
|
646
648
|
var _a3, _b2, _c;
|
647
649
|
return {
|
648
650
|
value: (_b2 = (_a3 = item.id) == null ? void 0 : _a3.toString()) != null ? _b2 : "",
|
649
|
-
label: (_c = item.name) != null ? _c : ""
|
651
|
+
label: labelWithCode ? `${item.code}-${item.name}` : (_c = item.name) != null ? _c : ""
|
650
652
|
};
|
651
653
|
})) != null ? _a2 : [];
|
652
654
|
}, [query.data]);
|
package/dist/core/index.d.mts
CHANGED
@@ -108,8 +108,9 @@ declare function MySelect({ label, data, isLoading, isError, ...rest }: MySelect
|
|
108
108
|
interface MySelectFromAPIProps<IRes = IBaseEntity[], IBody = any> extends Omit<MySelectProps, 'isLoading' | 'isError'> {
|
109
109
|
queryKey: QueryKey;
|
110
110
|
axiosFn: () => Promise<AxiosResponse<MyApiResponse<IRes>, IBody>>;
|
111
|
+
labelWithCode?: boolean;
|
111
112
|
}
|
112
|
-
declare function MySelectFromAPI<IRes = IBaseEntity[], IBody = any>({ queryKey, axiosFn, ...rest }: MySelectFromAPIProps<IRes, IBody>): react_jsx_runtime.JSX.Element;
|
113
|
+
declare function MySelectFromAPI<IRes = IBaseEntity[], IBody = any>({ queryKey, axiosFn, labelWithCode, ...rest }: MySelectFromAPIProps<IRes, IBody>): react_jsx_runtime.JSX.Element;
|
113
114
|
|
114
115
|
interface CoreTextInputProps extends TextInputProps {
|
115
116
|
label?: string;
|
package/dist/core/index.mjs
CHANGED