fixing placeholder text on current change

pull/3868/head
lianahus 1 year ago committed by Aniket
parent 13d19f0b42
commit e8040592b1
  1. 5
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx
  2. 1
      libs/remix-ui/run-tab/src/lib/components/contractGUI.tsx

@ -6,6 +6,7 @@ import { ContractData, FuncABI, OverSizeLimit} from '@remix-project/core-plugin'
import * as ethJSUtil from '@ethereumjs/util'
import { ContractGUI } from './contractGUI'
import { CustomTooltip, deployWithProxyMsg, upgradeWithProxyMsg } from '@remix-ui/helper'
import { title } from 'process'
const _paq = window._paq = window._paq || []
export function ContractDropdownUI (props: ContractDropdownProps) {
@ -233,6 +234,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
})
} else{
setCompilerName('')
setContractOptions({title: <FormattedMessage id='udapp.contractOptionsTitle1' />, disabled: true})
}
}
@ -316,6 +318,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
<div id="udappcontractNamesWrapper" className="w-100">
<select ref={contractsRef}
value={currentContract}
name={contractOptions.title.toString()}
onChange={handleContractChange}
className="udapp_contractNames custom-select"
disabled={contractOptions.disabled}
@ -326,7 +329,7 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
return <option key={index} value={contract.alias}>
{contract.alias} - {contract.file}
</option>
}) }
})}
</select>
</div>
</CustomTooltip>

@ -410,7 +410,6 @@ export function ContractGUI (props: ContractGUIProps) {
onClick={handleExpandMultiClick}
>
<button
type="button"
data-id={buttonOptions.dataId}
className={`udapp_instanceButton ${buttonOptions.classList}`}
disabled={props.disabled || (props.inputs !=='' && basicInput === '')}

Loading…
Cancel
Save