upd: form tambah surat

Deskripsi:
- fix select jenis surat pada saat selesai input

No Issue
This commit is contained in:
2026-01-21 09:02:25 +08:00
parent b0752dac8d
commit ec8722ffba

View File

@@ -173,7 +173,7 @@ export default function FormSurat() {
(typeof item.value === "string" && item.value.trim() === "" && item.required) || (typeof item.value === "object" && item.value === null && item.required), (typeof item.value === "string" && item.value.trim() === "" && item.required) || (typeof item.value === "object" && item.value === null && item.required),
); );
} }
return typeof value === "string" && value.trim() === "" ; return typeof value === "string" && value.trim() === "";
}); });
if (isFormKosong) { if (isFormKosong) {
@@ -385,7 +385,7 @@ export default function FormSurat() {
value: item.name, value: item.name,
label: item.name, label: item.name,
}))} }))}
value={jenisSuratFix.name} value={jenisSuratFix.name == "" ? null : jenisSuratFix.name}
onChange={(value) => { onChange={(value) => {
const slug = toSlug(String(value)); const slug = toSlug(String(value));
navigate("/darmasaba/surat?jenis=" + slug); navigate("/darmasaba/surat?jenis=" + slug);