Skip to content

Commit

Permalink
fix: clean modal fields when open a new add config
Browse files Browse the repository at this point in the history
  • Loading branch information
hcavarsan committed Dec 7, 2023
1 parent 1150d41 commit cb8edbf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,17 @@ const App: React.FC = () => {
remote_port: "",
namespace: "",
})
const openModal = () => setIsModalOpen(true)
const openModal = () => {
setNewConfig({
id: 0,
service: "",
context: "",
local_port: "",
remote_port: "",
namespace: "",
});
setIsModalOpen(true);
}
const closeModal = () => setIsModalOpen(false)
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const { name, value } = e.target
Expand Down

0 comments on commit cb8edbf

Please sign in to comment.