-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: uncontrolled input in dashboard #895
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,19 +32,19 @@ export const Form = ({ | |
<form onSubmit={form.onSubmit(saveSettings(form))}> | ||
<Grid> | ||
<Grid.Col span={6}> | ||
<Checkbox label="Record window data" {...form.getInputProps('RECORD_WINDOW_DATA')} checked={form.values.RECORD_WINDOW_DATA} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this prevent the checkboxes from being checked appropriately depending on the configuration values? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<Checkbox label="Record window data" {...form.getInputProps('RECORD_WINDOW_DATA')} /> | ||
</Grid.Col> | ||
<Grid.Col span={6}> | ||
<Checkbox label="Record active element state" {...form.getInputProps('RECORD_ACTIVE_ELEMENT_STATE')} checked={form.values.RECORD_ACTIVE_ELEMENT_STATE} /> | ||
<Checkbox label="Record active element state" {...form.getInputProps('RECORD_ACTIVE_ELEMENT_STATE')} /> | ||
</Grid.Col> | ||
<Grid.Col span={6}> | ||
<Checkbox label="Record video" {...form.getInputProps('RECORD_VIDEO')} checked={form.values.RECORD_VIDEO} /> | ||
<Checkbox label="Record video" {...form.getInputProps('RECORD_VIDEO')} /> | ||
</Grid.Col> | ||
<Grid.Col span={6}> | ||
<Checkbox label="Record images" {...form.getInputProps('RECORD_IMAGES')} checked={form.values.RECORD_IMAGES} /> | ||
<Checkbox label="Record images" {...form.getInputProps('RECORD_IMAGES')} /> | ||
</Grid.Col> | ||
<Grid.Col span={6}> | ||
<Checkbox label="Record browser (Chrome) events (see <insert link to relevant README section> to install extension)" {...form.getInputProps('RECORD_BROWSER_EVENTS')} checked={form.values.RECORD_BROWSER_EVENTS} /> | ||
<Checkbox label="Record browser (Chrome) events (see <insert link to relevant README section> to install extension)" {...form.getInputProps('RECORD_BROWSER_EVENTS')} /> | ||
</Grid.Col> | ||
<Grid.Col span={6}> | ||
<TextInput label="Video pixel format" placeholder="Video pixel format" {...form.getInputProps('VIDEO_PIXEL_FORMAT')} /> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the third place we are duplicating configuration setting names. Is there any way to populate this dynmamically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we populate this dynamically using config file but sometimes we might get undefined values which might be the reason for warning. So, I added these default values