Skip to content

Commit

Permalink
fix textfield states
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Mar 6, 2024
1 parent 0e6f295 commit b8ad252
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions ui/app/alert-config/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ function getSlackProps(
placeholder='Auth Token'
value={config.auth_token}
onChange={(e) => {
setConfig((value) => {
value.auth_token = e.target.value;
return value;
});
setConfig((previous) => ({
...previous,
auth_token: e.target.value,
}));
}}
/>
</div>
Expand All @@ -86,10 +86,10 @@ function getSlackProps(
placeholder='Comma separated'
value={config.channel_ids?.join(',')}
onChange={(e) => {
setConfig((value) => {
value.channel_ids = e.target.value.split(',');
return value;
});
setConfig((previous) => ({
...previous,
channel_ids: e.target.value.split(','),
}));
}}
/>
</div>
Expand All @@ -111,10 +111,10 @@ function getEmailProps(
placeholder='Comma separated'
value={config.email_addresses?.join(',')}
onChange={(e) => {
setConfig((value) => {
value.email_addresses = e.target.value.split(',');
return value;
});
setConfig((previous) => ({
...previous,
email_addresses: e.target.value.split(','),
}));
}}
/>
</div>
Expand Down

0 comments on commit b8ad252

Please sign in to comment.