Page MenuHomePhabricator

[web] Fix warning - set readOnly param to EnumSettingOption radio
ClosedPublic

Authored by jakub on Sep 12 2022, 5:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 5, 5:18 PM
Unknown Object (File)
Fri, Apr 5, 9:33 AM
Unknown Object (File)
Fri, Apr 5, 9:33 AM
Unknown Object (File)
Fri, Apr 5, 9:32 AM
Unknown Object (File)
Fri, Apr 5, 9:22 AM
Unknown Object (File)
Wed, Mar 27, 11:55 PM
Unknown Object (File)
Mar 11 2024, 8:43 AM
Unknown Object (File)
Mar 2 2024, 4:34 PM

Details

Summary

Fixing warning that occur on controlled radio input in EnumSettingsOption

Warning communiqué:

Screenshot 2022-09-12 at 14.49.09.png (974×1 px, 321 KB)

Test Plan
  1. Open console
  2. Open any modal that uses EnumSettingOption (e.g. channel notification modal)
  3. Now, this warning doesn't appear

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jakub edited the test plan for this revision. (Show Details)
jakub added reviewers: tomek, atul, ashoat.
atul requested changes to this revision.Sep 15 2022, 7:45 AM

Accepting with question

Do we not want this Radio component to be interactive, or is this readOnly included temporary until onChange is implemented?

This revision now requires changes to proceed.Sep 15 2022, 7:45 AM
This revision is now accepted and ready to land.Sep 15 2022, 7:45 AM

By default, this Radio component is only used in and controlled by EnumSettingsOption component. So basically, we don't need to pass any onChange function to them.

web/components/radio.react.js
10–13

Can we introduce a new prop readOnly to this component so that it remains usable in different contexts?