aq-fe-framework 0.1.434 → 0.1.436
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.
@@ -599,7 +599,14 @@ function MyRichTextEditor(props) {
|
|
599
599
|
|
600
600
|
// src/core/input/MySelect.tsx
|
601
601
|
import { Loader, Select } from "@mantine/core";
|
602
|
+
import React from "react";
|
602
603
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
604
|
+
function extractTextFromReactNode(node) {
|
605
|
+
if (typeof node === "string" || typeof node === "number") return String(node);
|
606
|
+
if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
|
607
|
+
if (React.isValidElement(node)) return extractTextFromReactNode(node.props.children);
|
608
|
+
return "";
|
609
|
+
}
|
603
610
|
function MySelect(_a) {
|
604
611
|
var _b = _a, { label, data, isLoading, isError } = _b, rest = __objRest(_b, ["label", "data", "isLoading", "isError"]);
|
605
612
|
let placeholder = "";
|
@@ -608,7 +615,8 @@ function MySelect(_a) {
|
|
608
615
|
} else if (isLoading) {
|
609
616
|
placeholder = "\u0110ang t\u1EA3i...";
|
610
617
|
} else if (label) {
|
611
|
-
|
618
|
+
const plainTextLabel = extractTextFromReactNode(label).toLowerCase();
|
619
|
+
placeholder = `Ch\u1ECDn ${plainTextLabel}`;
|
612
620
|
}
|
613
621
|
return /* @__PURE__ */ jsx11(
|
614
622
|
Select,
|
package/dist/core/index.d.mts
CHANGED
@@ -95,7 +95,7 @@ interface MyRichTextEditorProps {
|
|
95
95
|
declare function MyRichTextEditor(props: MyRichTextEditorProps): react_jsx_runtime.JSX.Element;
|
96
96
|
|
97
97
|
interface MySelectProps extends SelectProps {
|
98
|
-
label?:
|
98
|
+
label?: ReactNode;
|
99
99
|
data?: Array<string | {
|
100
100
|
value: string;
|
101
101
|
label: string;
|
package/dist/core/index.mjs
CHANGED