reset upgradeability radio buttons

pull/5370/head
Aniket-Engg 2 years ago
parent b07a608ee5
commit 7318b71b3b
  1. 10
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -21,6 +21,8 @@ export function Workspace () {
const mintableCheckboxRef = useRef() const mintableCheckboxRef = useRef()
const burnableCheckboxRef = useRef() const burnableCheckboxRef = useRef()
const pausableCheckboxRef = useRef() const pausableCheckboxRef = useRef()
const transparentRadioRef = useRef()
const uupsRadioRef = useRef()
const global = useContext(FileSystemContext) const global = useContext(FileSystemContext)
const workspaceRenameInput = useRef() const workspaceRenameInput = useRef()
const workspaceCreateInput = useRef() const workspaceCreateInput = useRef()
@ -166,6 +168,10 @@ export function Workspace () {
burnableCheckboxRef.current.checked = false burnableCheckboxRef.current.checked = false
// @ts-ignore // @ts-ignore
pausableCheckboxRef.current.checked = false pausableCheckboxRef.current.checked = false
// @ts-ignore
transparentRadioRef.current.checked = false
// @ts-ignore
uupsRadioRef.current.checked = false
} else displayOzCustomRef.current.style.display = 'none' } else displayOzCustomRef.current.style.display = 'none'
// @ts-ignore // @ts-ignore
@ -239,11 +245,11 @@ export function Workspace () {
<label id="wsName" className="form-check-label d-block mb-1">Upgradeability</label> <label id="wsName" className="form-check-label d-block mb-1">Upgradeability</label>
<div onChange={(e) => handleUpgradeability(e)}> <div onChange={(e) => handleUpgradeability(e)}>
<div className="d-flex ml-2 custom-control custom-radio"> <div className="d-flex ml-2 custom-control custom-radio">
<input className="custom-control-input" type="radio" name="upgradeability" value="transparent" id="transparent" /> <input className="custom-control-input" type="radio" name="upgradeability" value="transparent" id="transparent" ref={transparentRadioRef} />
<label className="form-check-label custom-control-label" htmlFor="transparent" data-id="upgradeTypeTransparent" >Transparent</label> <label className="form-check-label custom-control-label" htmlFor="transparent" data-id="upgradeTypeTransparent" >Transparent</label>
</div> </div>
<div className="d-flex ml-2 custom-control custom-radio"> <div className="d-flex ml-2 custom-control custom-radio">
<input className="custom-control-input" type="radio" name="upgradeability" value="uups" id="uups" /> <input className="custom-control-input" type="radio" name="upgradeability" value="uups" id="uups" ref={uupsRadioRef} />
<label className="form-check-label custom-control-label" htmlFor="uups" data-id="upgradeTypeUups" >UUPS</label> <label className="form-check-label custom-control-label" htmlFor="uups" data-id="upgradeTypeUups" >UUPS</label>
</div> </div>
</div> </div>

Loading…
Cancel
Save