mui / mui/material-ui

[Joy][Select] Cannot retrieve value from Select component using Typescript

Open
#36,946 9 comments 1 reaction 2 assignees View on GitHub

@sai6855 is already working on this.

Since Apr 29, 2023.

docs on hold package: joy-ui scope: all components type: enhancement
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Steps to reproduce 🕹

Link to live example:

Steps:

  1. Created Select Component using Mui Joy
  2. Added onChange event to retrieve current value
  3. event.target.value is not available so retrieving value is not possible
    image
Current behavior 😯

onChange event specifies on using these types of event: React.MouseEvent<Element, MouseEvent> | React.KeyboardEvent | React.FocusEvent<Element, Element> | null, value: {} | null. But none of those provide an option to get value from Select component

Expected behavior 🤔

It should be possible to retrieve value from Select Component

Context 🔦

I am trying to implement the Select component from MUI JOY using typescript and i added the onChange event capturer so i can get the value selected from the user but it is not possible

Your environment 🌎

System:
OS: Linux 5.10 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
Binaries:
Node: 18.14.1 - ~/.nvm/versions/node/v18.14.1/bin/node
Yarn: Not Found
npm: 9.3.1 - ~/.nvm/versions/node/v18.14.1/bin/npm
Browsers:
Chrome: Not Found
Firefox: Not Found
npmPackages:
@emotion/react: ^11.10.5 => 11.10.5
@emotion/styled: ^11.10.5 => 11.10.5
@mui/base: 5.0.0-alpha.117
@mui/core-downloads-tracker: 5.11.8
@mui/icons-material: ^5.11.0 => 5.11.0
@mui/joy: ^5.0.0-alpha.66 => 5.0.0-alpha.66
@mui/material: 5.11.8
@mui/private-theming: 5.11.7
@mui/styled-engine: 5.11.8
@mui/system: 5.11.8
@mui/types: 7.2.3
@mui/utils: 5.11.7
@types/react: ^18.0.27 => 18.0.27
react: ^18.2.0 => 18.2.0
react-dom: ^18.2.0 => 18.2.0
typescript: ^4.9.5 => 4.9.5

Used Microsoft Edge

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.