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)
Mon, Nov 25, 8:00 PM
Unknown Object (File)
Mon, Nov 25, 4:22 PM
Unknown Object (File)
Fri, Nov 8, 8:32 PM
Unknown Object (File)
Thu, Nov 7, 9:19 PM
Unknown Object (File)
Thu, Nov 7, 9:19 PM
Unknown Object (File)
Thu, Nov 7, 9:09 PM
Unknown Object (File)
Thu, Nov 7, 7:17 PM
Unknown Object (File)
Oct 9 2024, 3:17 AM

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
Branch
jakub/channel-composer
Lint
No Lint Coverage
Unit
No Test Coverage

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 ↗(On Diff #16732)

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