Skip to content

Commit

Permalink
[sui] fix string vector parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kairoski03 committed Nov 20, 2024
1 parent eed878e commit 41cc0b8
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions src/components/sui/VectorArgForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -705,32 +705,36 @@ const VectorArgForm: React.FunctionComponent<Props> = ({
<label>String</label>
</div>
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Decimal</label>
{vectorElType !== '0x1::string::String' && (
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-decimal-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Decimal</label>
</div>
</div>
</div>
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Hex</label>
)}
{vectorElType !== '0x1::string::String' && (
<div style={{ display: 'flex', alignItems: 'center' }}>
<input
className={`vec-parse-type-${parentIdx}`}
id={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
type="radio"
name={`vec-parse-type-${parentIdx}-hex-${indexMemo.join('-')}`}
placeholder={vectorElType}
onChange={(event) => handleParseType(event, parentIdx)}
/>
<div style={{ marginLeft: '0.5em', marginRight: '0.5em' }}>
<label>Hex</label>
</div>
</div>
</div>
)}
</div>
</div>
<div style={{ border: '0.1px solid', padding: '0.5em' }}>{renderWrapper()}</div>
Expand Down

0 comments on commit 41cc0b8

Please sign in to comment.