mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-22 01:30:15 +00:00
better handle form resets
This commit is contained in:
parent
35f14fc57a
commit
a6dcbd6124
1 changed files with 2 additions and 1 deletions
|
|
@ -63,7 +63,6 @@ const M3U = ({ playlist = null, isOpen, onClose, playlistCreated = false }) => {
|
|||
|
||||
useEffect(() => {
|
||||
if (playlist) {
|
||||
console.log(playlist);
|
||||
form.setValues({
|
||||
name: playlist.name,
|
||||
server_url: playlist.server_url,
|
||||
|
|
@ -72,6 +71,8 @@ const M3U = ({ playlist = null, isOpen, onClose, playlistCreated = false }) => {
|
|||
is_active: playlist.is_active,
|
||||
refresh_interval: playlist.refresh_interval,
|
||||
});
|
||||
} else {
|
||||
form.reset();
|
||||
}
|
||||
}, [playlist]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue