Skip to content

Commit

Permalink
added checkbox on the left to dropdown items
Browse files Browse the repository at this point in the history
  • Loading branch information
rifeljm committed Aug 22, 2023
1 parent 6850d1f commit 0377a8e
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
Typography,
Select,
MenuItem,
Checkbox,
} from '@mui/material';
import React, { useEffect, useState } from 'react';
import { useForm, useWatch } from 'react-hook-form';
Expand Down Expand Up @@ -125,13 +126,25 @@ export default function WalletConnectAddConnectionDialog(props: WalletConnectAdd

function renderKeysMultiSelect() {
return (
<Select sx={{ width: '100%' }} multiple value={selectedFingerprints}>
<Select
multiple
value={selectedFingerprints}
sx={{
'.MuiSelect-select .Mui-checked': {
display: 'none',
},
}}
>
{keys?.map((key, index) => (
<MenuItem
key={key.fingerprint}
value={key.fingerprint}
onClick={() => handleToggleSelectFingerprint(key.fingerprint)}
sx={{
paddingLeft: '4px',
}}
>
<Checkbox checked={selectedFingerprints.includes(key.fingerprint)} disableRipple />
{key.label || <Trans>Wallet {index + 1}</Trans>} ({key.fingerprint})
</MenuItem>
))}
Expand Down

0 comments on commit 0377a8e

Please sign in to comment.