نظرة عامة
FormFieldRow يرتب تسمية الحقل والأيقونة الزخرفية الاختيارية ومحتوى الحقل وعناصر التحكم الختامية. استخدمه لحقول المؤلف أو مجموعات الحقول الأخرى المحاذاة. يتحكم تطبيقك في قيم الحقول والتحقق من الصحة والأذونات والاستمرارية.
استخدام
التخطيط والتسميات
تكون القيمة الافتراضية لـlabelWidth هي 80 بكسل، ويقبل عرض CSS. استخدم القيمة نفسها في الصفوف الشقيقة لمحاذاة تسمياتها. يُحدَّد عمود التسمية بنسبة 40% من الصف، ويمكن أن يلتف المحتوى في التخطيطات الضيقة. startIcon للزينة؛ ويحدد المستدعي أبعاده. اضبط hasDivider={false} في الصف الأخير عندما يوفر السطح المحيط حدوده.
الجذر هو مجموعة تُسمّى بواسطة label. وفّر aria-label أو aria-labelledby عند حذف التسمية المرئية، وسمِّ كل إدخال متداخل بشكل منفصل. لا ينقل الصف التركيز ولا يعطّل عناصر التحكم المتداخلة. تحتفظ عناصر التحكم هذه بسلوك لوحة المفاتيح وأنماط التركيز الخاصة بها.
الأحداث والتخصيص
تُطبَّق السمات الأصلية ومعالجات الأحداث وclassName وstyle وref وrender على جذر المجموعة. مرّر props وref الموفَّرين عند استبدال الجذر عبر render. يعرض معالج onClick مؤشرًا على شكل سهم. يتحكم المستدعي في سلوك النقر للتركيز، ويحمي الأحداث من عناصر التحكم المتداخلة أو البوابات عند الحاجة. يتيح isHoverable بشكل مستقل خلفية تمرير محايدة.
يطبّق trailingProps السمات الأصلية والمعالجات وref على الغلاف اللاحق الموجود. يُدمج className الخاص به مع فئة التخطيط المشتركة. استخدم معالج onClick الخاص به لمنع إجراء لاحق من تشغيل معالج النقر للصف. يوجد الغلاف فقط عندما يحتوي trailing على محتوى قابل للعرض.
الإزاحة
ReactNode
مطلوب
Field content, such as plain inputs, recipient chips, selectors or toggles. The caller owns input labels, state and click-to-focus behavior.
string
CSS class applied to the group root.
boolean
افتراضي:"true"
Shows a decorative bottom divider. Set false on the final row when the surrounding surface supplies its own border.
boolean
افتراضي:"false"
Enables a neutral hover background independently of click handlers. Keyboard focus remains on nested controls without changing the row background.
string
Optional visible field label and default group name. Supply aria-label or aria-labelledby when the label is omitted. Label each nested input separately.
Width<string | number>
افتراضي:"80"
Preferred label column width, capped at 40% of the row. Numbers use pixels; use the same width for aligned sibling rows.
MouseEventHandler<HTMLDivElement>
Native group click handler. Providing a handler shows a pointer cursor; the caller guards nested-control and portaled events as needed.
Ref<HTMLDivElement>
Ref forwarded to the group root div.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>
Customizes the group root. Forward its props and ref.
ReactNode
Optional decorative icon before the label. The caller controls icon dimensions.
CSSProperties
Inline styles applied to the group root.
ReactNode
Optional trailing content. Nested controls retain their own keyboard focus and event behavior.
Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children">
Native props, event handlers and ref applied to the trailing content wrapper. The wrapper is rendered only when trailing content is present; className is merged with the shared layout class.