Skip to content

Instantly share code, notes, and snippets.

View mrudangshah's full-sized avatar
🎯
Focusing

Mrudang Shah mrudangshah

🎯
Focusing
View GitHub Profile
@mrudangshah
mrudangshah / field.js
Last active December 4, 2019 14:06
I am getting console log for the *value* attr of `option` tag, but it is giving me an `undefined` for *data* attr of it's console log as i am doing the same thing for both so why the data attr is undefined ?
import { usersContext } from '../../Context';
class UserssField extends React.Component {
constructor (props) {
super(props);
}
selectUsers(e) {
var options = e.target.options;