react-component / react-component/select

How to passed data-* ?

Open
#431 3 comments 0 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

On documentation, especially this section
listed passing data-* attribute, but how to implemented it?

i'd try like this

...
state = {
  value:""
}
...
// onchange event
handleChange(e) {
    console.log(e);
}
...
<Select
  onChange={this.handleChange.bind(this)}
  style={{ opacity: 1 }}
  value={this.state.value}
  data-value_nil={"selected_1"}
>
          {
            data.map((item, i) =>
              <Option key={i} value={item.nama}>{item.nama}</Option>
            )
          }
</Select>
...

but only show value only, 😬

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 with the linked Select Props section and the Select usage shown in the issue, then trace how custom data-* props are handled by the Select component. Document the supported usage and expected behavior, with an example that makes clear where the attribute can be observed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation, frontend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.