react-component / react-component/select

tagRender option and tag wrapper

Open
#520 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

Hello! I have a component extending the Select with tags mode enabled.
I'd like to have a regular tag wrapper, but just change the inside of the tag.
Unfortunately the wrapper is not the same when we use the tagRender option and there is now way to control it.

It is:
https://github.com/react-component/select/blob/51df020dfd72524892e0569ab02d4f536b53cc67/src/Selector/MultipleSelector.tsx#L146

Instead of:
https://github.com/react-component/select/blob/51df020dfd72524892e0569ab02d4f536b53cc67/src/Selector/MultipleSelector.tsx#L156-L162

I would need it to be always like the second one. Without the onMouseDown event and with the proper className.

Any reason why the current implementation is like that ?

Thanks

Contributor guide

No contributing guide indexed for this repository

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

Start in src/Selector/MultipleSelector.tsx at the linked tagRender branches around lines 146 and 156-162. Compare the wrapper behavior in both paths and verify that tagRender changes only the tag contents while the wrapper keeps the regular className and omits onMouseDown; the issue is complete when this behavior is consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.