JedWatson / JedWatson/react-select

MultiValue and MultiValueLabel not clickable on mobile browser

Open
#4,401 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-confirmed
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

I try to add a link to the MultiValueLabel area, I use cusome MultiValueLabel, and add the link to the MultiValueLabel, it works fine in the desktop browser, but it doens't work on the mobile browser

the code:

const ContactValueLabel = props => {
  const { data:{contact_id}, children } = props;
  
  return (
      <components.MultiValueLabel {...props}>
        <a rel="noopener noreferrer"  href={`/contacts/info/${contact_id}`} target="_blank">{children}</a>
      </components.MultiValueLabel>
  );
};

<AsyncSelect
      isMulti
      cacheOptions
      defaultOptions
      openMenuOnFocus
      openMenuOnClick={false}
      components={
        { Option: ContactOption, MultiValueLabel: ContactValueLabel }
      }
      getOptionLabel={(option) => (`${option.first_name} ${option.last_name}`)}
      getOptionValue={(option) => (option.id)}
      loadOptions={promiseOptions}
    />

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the custom MultiValueLabel example with AsyncSelect and the nested link in a mobile browser, then compare its interaction with desktop behavior. Trace the MultiValueLabel and link event handling to identify why the link is not clickable on mobile; done when the provided link activates reliably on mobile without breaking desktop behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.