Skip to content

Commit

Permalink
fix: show selected redactedBY
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Oct 16, 2024
1 parent 8239e9e commit 78f5f10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/frontend/src/features/InfoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const InfoForm = () => {
time: meetDate ? format(new Date(meetDate), "HH:mm") : "",
});

const redactedById = useWatch({ control: form.control, name: "redactedById" });

const tryToSetMeetDate = () => {
const day = meetDateRef.current.day;
const time = meetDateRef.current.time;
Expand Down Expand Up @@ -90,7 +92,9 @@ export const InfoForm = () => {
nativeSelectProps={redactedByProps}
>
{redactedByOptions?.map((option) => (
<option key={option.value} value={option.value}>
<option key={option.value} value={option.value} selected={
redactedById === option.value
}>
{option.label}
</option>
)) ?? null}
Expand Down

0 comments on commit 78f5f10

Please sign in to comment.