From e734b5f5def5037b96a927ab36b624c230eac495 Mon Sep 17 00:00:00 2001 From: Syed Ali Shahbaz Date: Mon, 2 Aug 2021 12:42:46 +0530 Subject: [PATCH] Entering Title autogenerates Slug --- pages/availability/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/availability/index.tsx b/pages/availability/index.tsx index 7a7824db73..ff8cdd8a64 100644 --- a/pages/availability/index.tsx +++ b/pages/availability/index.tsx @@ -31,6 +31,12 @@ export default function Availability(props) { return
; } + function autoPopulateSlug() { + let t = titleRef.current.value; + t = t.replace(/\s+/g, '-').toLowerCase(); + slugRef.current.value = t; + } + function toggleAddModal() { setShowAddModal(!showAddModal); } @@ -237,7 +243,7 @@ export default function Availability(props) {
- +