Fixing Ghost Input (#2161)

* Fixing Ghost Input

* Removing form import

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
sean-brydon 2022-03-16 21:04:12 +00:00 committed by GitHub
parent 6e4f8e67b6
commit f9f856d7ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -660,7 +660,12 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
<div className="flex">
<button
type="button"
onClick={() => openLocationModal(location.type)}
onClick={() => {
locationFormMethods.setValue("locationType", location.type);
locationFormMethods.unregister("locationLink");
locationFormMethods.unregister("locationAddress");
openLocationModal(location.type);
}}
className="mr-1 p-1 text-gray-500 hover:text-gray-900">
<PencilIcon className="h-4 w-4" />
</button>
@ -1610,6 +1615,8 @@ const EventTypePage = (props: inferSSRProps<typeof getServerSideProps>) => {
onChange={(val) => {
if (val) {
locationFormMethods.setValue("locationType", val.value);
locationFormMethods.unregister("locationLink");
locationFormMethods.unregister("locationAddress");
setSelectedLocation(val);
}
}}