refactor: enhance handling of supplementary insurance in Form and AppointmentPage components

This commit is contained in:
hamed
2025-11-18 10:35:35 +03:30
parent 3268b3c51e
commit 5c98b4de3e
4 changed files with 99 additions and 15 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ function DefaultSelect({ list, value, updateData, label, error, name }) {
}}
className="!w-full !rounded-lg auto-complete-selector"
onChange={(_, newValue) => {
updateData(name, newValue?.id || newValue?.label || newValue || "");
// اگر آیتم انتخاب شده باشد، کل شیء را برمی‌گردانیم، در غیر این صورت خالی
updateData(name, newValue || "");
}}
sx={{
...styleTextSelectRight,