Posts

Showing posts with the label Material Ui

Can't Get The Target Attributes Of Material-ui Select React Component

Answer : Update 2 In response to your comments: As per the material-ui docs, getting back the touchtap event on option element rather than the select element is expected. If you want the id and name of the element, I would suggest binding the variables to the callback: The onchange method in the parent component: _onChange(id, name, evt, key, payload) { console.log(id); //id of select console.log(name); //name of name console.log(payload); //value of selected option } And when you attach it to the select component, you need to use bind <Select value={this.props.test} name={"test"} id={"test"} onChange={this.props.onChange.bind(null,"id","name")} hintText={"Select a fitch rating service"}> Update Here are the react event docs. Under the event-pooling you will find reference to the use of e.persists() in the block quote. The explanation given in this issue is that React pools t...

Accessing Previous Theme Variables In CreateMuiTheme

Answer : You'd need to create an instance of the default theme and use it when defining your own: import { createMuiTheme } from 'material-ui/styles'; const defaultTheme = createMuiTheme(); const theme = createMuiTheme({ typography: { fontSize: defaultTheme.typography.fontSize + 2 } }); export default theme; You can also create your theme and then add on to it after theme is created. import { createMuiTheme } from 'material-ui/styles'; const theme = createMuiTheme(); theme.typography = { ...theme.typography, fontSize: theme.typography.fontSize + 2 } export default theme;