material-ui

Cannot get material-ui datepicker to work

Deadly 提交于 2020-06-13 17:35:24
问题 For some reason, I cannot get the material-ui datepicker to work. Every time the datepicker is rendered in React, the following error is thrown: RangeError: Format string contains an unescaped latin alphabet character n I have created a stackblitz with just the datepicker (https://stackblitz.com/edit/react-6ma6xd?embed=1&file=index.js) and even there the error shows up. What am I doing wrong? I think I followed all the instructions from the installation guide. Link to the material-ui/pickers:

Cannot get material-ui datepicker to work

≯℡__Kan透↙ 提交于 2020-06-13 17:30:32
问题 For some reason, I cannot get the material-ui datepicker to work. Every time the datepicker is rendered in React, the following error is thrown: RangeError: Format string contains an unescaped latin alphabet character n I have created a stackblitz with just the datepicker (https://stackblitz.com/edit/react-6ma6xd?embed=1&file=index.js) and even there the error shows up. What am I doing wrong? I think I followed all the instructions from the installation guide. Link to the material-ui/pickers:

ReactJS Typescript: Type 'number' is not assignable to type '0 | 8 | 16 | 24 | 32 | 40 | undefined'

蹲街弑〆低调 提交于 2020-06-13 08:40:55
问题 I would like to reproduce a grid from material-ui in react using typescript. A live demo can be found here. I have adjusted the example to work with typescript such that my demo.jsx looks as: import { withStyles } from '@material-ui/core/styles'; import Grid from '@material-ui/core/Grid'; import FormLabel from '@material-ui/core/FormLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel'; import RadioGroup from '@material-ui/core/RadioGroup'; import Radio from '@material-ui

Angular Mat tree re-render performance issue takes too much time

 ̄綄美尐妖づ 提交于 2020-06-13 00:29:51
问题 I am using mat-tree with very big data sets in child nodes on API call child having around 3k records and what I am doing is I'm updating the dataSource by adding the children from API under the dataSource and re rendering by this.dataSource.data = updatedDataDource; It is taking more than 15 seconds to re render and it is not acceptable. Is there any way so that I can re render only that node and that associated children from api(I mean kind of partial rendering). Please help if any one have

Add custom theme variable object to createMuiTheme()

◇◆丶佛笑我妖孽 提交于 2020-06-12 06:23:22
问题 By default the material UI theme is a combination of several pre-defined objects such as typography: {...} , palette: {...} etc. Is is possible to add a custom object into this setup and still use createMuiTheme ? So for example the theme object would become: const theme = { palette: { primary: '#000' }, typography: { body1: { fontFamily: 'Comic Sans' } }, custom: { myOwnComponent: { margin: '10px 10px' } } } 回答1: Yes, this works just fine. Material-UI does a deep merge of its defaults with

Handle change on Autocomplete Component from material ui

為{幸葍}努か 提交于 2020-06-09 16:55:33
问题 I want to use Autocomplete component for input tags. I'm trying to get the tags and save them on a state so I can later save them on the database. I'm using functions instead of classes in react. I did try with onChange , but I didn't get any result. <div style={{ width: 500 }}> <Autocomplete multiple options={autoComplete} filterSelectedOptions getOptionLabel={option => option.tags} renderInput={params => (<TextField className={classes.input} {...params} variant="outlined" placeholder=

Overriding the material-UI style not working

牧云@^-^@ 提交于 2020-06-07 07:06:17
问题 I am new to the material UI. Here, I am trying to override the CSS of material UI tabs component. <Tab key={`${tab}_${index}`} classes={{ flexcontainer: css.tabFlexContainer }} disableRipple label={tab.label} value={tab.value} icon={ tab.icon ? <Icons className={css.tabIcons} iconname={tab.icon} /> : null } /> So, here I am trying to override the flexContainer class with this CSS: . tabFlexContainer { width : 100% justify -content :space-between } So, when I am using I am getting a compiled

Material-UI ExpansionPanelSummary expanded class

佐手、 提交于 2020-06-01 06:42:28
问题 In the documentation for Material-UI ExpansionPanelSummary there are several class override names where expanded is one of them. Could someone explain why it is not possible to use the following code to set the size of the root as well as expanded state? <ExpansionPanelSummary classes={{ root: { midWidth: 30}, expanded: { minWidth: 30} }}> foo bar </ExpansionPanelSummary> 回答1: you need to follow the styles overriding methods as the material-ui suggested. please find methods from here: https:/

Material-UI ExpansionPanelSummary expanded class

穿精又带淫゛_ 提交于 2020-06-01 06:41:50
问题 In the documentation for Material-UI ExpansionPanelSummary there are several class override names where expanded is one of them. Could someone explain why it is not possible to use the following code to set the size of the root as well as expanded state? <ExpansionPanelSummary classes={{ root: { midWidth: 30}, expanded: { minWidth: 30} }}> foo bar </ExpansionPanelSummary> 回答1: you need to follow the styles overriding methods as the material-ui suggested. please find methods from here: https:/

how to use Grid Inside the Map in React material-ui

十年热恋 提交于 2020-06-01 05:56:29
问题 I use React js.I want to use Grid, but I can't in this particular case. I have a component called CardComponent.js The problem is that I use the map function. I don't know how to use Grid. import React from "react"; const rows = [ { id: 7, email: "michael.lawson@reqres.in", first_name: "Michael", last_name: "Lawson" }, { id: 8, email: "lindsay.ferguson@reqres.in", first_name: "Lindsay", last_name: "Ferguson" }, { id: 9, email: "michael.lawson@reqres.in", first_name: "Michael", last_name: