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, Dec 16, 6:41 AM
Unknown Object (File)
Mon, Dec 2, 10:08 PM
Unknown Object (File)
Sun, Dec 1, 11:43 AM
Unknown Object (File)
Nov 25 2024, 8:00 PM
Unknown Object (File)
Nov 25 2024, 4:22 PM
Unknown Object (File)
Nov 8 2024, 8:32 PM
Unknown Object (File)
Nov 7 2024, 9:19 PM
Unknown Object (File)
Nov 7 2024, 9:19 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?