material-ui

How to control programmatically the toggling of a row?

房东的猫 提交于 2020-07-09 06:13:48
问题 I'm using MaterialTable with REACT (Datatable for React based on Material-UI Table. material-table.com) more precisely the detailed-panel - material-table.com/#/docs/features/detail-panel What do I need? user should open/close detailed panels and drag/drop items between them. The problem: each time I React rendering the table all detailed panels are closes. I'm seeking for a solution that will allow me to set a flag for each row that notes whether it's hidden or open. So while rendering ..

How to control programmatically the toggling of a row?

我与影子孤独终老i 提交于 2020-07-09 06:13:45
问题 I'm using MaterialTable with REACT (Datatable for React based on Material-UI Table. material-table.com) more precisely the detailed-panel - material-table.com/#/docs/features/detail-panel What do I need? user should open/close detailed panels and drag/drop items between them. The problem: each time I React rendering the table all detailed panels are closes. I'm seeking for a solution that will allow me to set a flag for each row that notes whether it's hidden or open. So while rendering ..

How to remove focused highlight in React material-ui Tab Component?

馋奶兔 提交于 2020-07-09 05:38:30
问题 I am using a Tab component from the react Material-ui library. The tab appears with this weird outline on the left and right borders when the Tab element is in focus. Is there any way to remove this active / focus outline? Below is an image of the weird focus styling in question My code is below: import { Fragment } from 'react'; import styled from 'styled-components' import Card from 'components/Elements/Card'; import CardItem from 'components/Elements/CardItem'; import CreateAccountForm

How to remove focused highlight in React material-ui Tab Component?

冷暖自知 提交于 2020-07-09 05:37:06
问题 I am using a Tab component from the react Material-ui library. The tab appears with this weird outline on the left and right borders when the Tab element is in focus. Is there any way to remove this active / focus outline? Below is an image of the weird focus styling in question My code is below: import { Fragment } from 'react'; import styled from 'styled-components' import Card from 'components/Elements/Card'; import CardItem from 'components/Elements/CardItem'; import CreateAccountForm

Material UI Select override Position in theme

拜拜、爱过 提交于 2020-07-09 04:55:33
问题 I want to override position of dropdown of selectfield in the theme (to not have to implement it on each select). I have try: createMuiTheme({ overrides: { MuiSelect: { select:{ MenuProps: { getContentAnchorEl: null, anchorOrigin: { vertical: "bottom", horizontal: "left", } } } } } } }); Position of dropdown is not override. I also try to replace select by selectMenu but nothing happen... When I pass directly to compnent props, it's working: <Select ...otherProperties, MenuProps={{

Material UI Select override Position in theme

橙三吉。 提交于 2020-07-09 04:55:26
问题 I want to override position of dropdown of selectfield in the theme (to not have to implement it on each select). I have try: createMuiTheme({ overrides: { MuiSelect: { select:{ MenuProps: { getContentAnchorEl: null, anchorOrigin: { vertical: "bottom", horizontal: "left", } } } } } } }); Position of dropdown is not override. I also try to replace select by selectMenu but nothing happen... When I pass directly to compnent props, it's working: <Select ...otherProperties, MenuProps={{

Can you add an additional color in Material UI?

两盒软妹~` 提交于 2020-07-09 03:56:27
问题 I already have a styleguide that I'm trying to implement in Material UI. I can see the Button's color prop takes these options: | 'default' | 'inherit' | 'primary' | 'secondary' However I need an additional one: | 'default' | 'inherit' | 'primary' | 'secondary' | 'tertiary' Can you create a new color in Material UI that works with the general theming system? Or is this not really how it's supposed to be used? 回答1: Though Material-UI does not support this directly, you can wrap Button in your

Can you add an additional color in Material UI?

落花浮王杯 提交于 2020-07-09 03:56:07
问题 I already have a styleguide that I'm trying to implement in Material UI. I can see the Button's color prop takes these options: | 'default' | 'inherit' | 'primary' | 'secondary' However I need an additional one: | 'default' | 'inherit' | 'primary' | 'secondary' | 'tertiary' Can you create a new color in Material UI that works with the general theming system? Or is this not really how it's supposed to be used? 回答1: Though Material-UI does not support this directly, you can wrap Button in your

Material-UI: How to show search icon in input field in react?

北城以北 提交于 2020-07-08 06:59:10
问题 I am using material ui. I want to show search icon in input field as shown in image I am using this API Here is my code I am able to show TextField but I am not able to add a search icon. Could you please add how to add ? <TextField id="standard-bare" defaultValue="Bare" margin="normal" /> 回答1: You need to use Input Adornments. For example: // imports import IconButton from "@material-ui/core/IconButton"; import InputAdornment from "@material-ui/core/InputAdornment"; import SearchIcon from "

Invalid hook call. Hooks can only be called inside of the body of a function component when apply style to class base component with material-ui

守給你的承諾、 提交于 2020-07-04 20:56:16
问题 I am just started to learn reactjs using material-ui but getting this error when apply style to my component. My code: const useStyles = makeStyles(theme => ({ root: { flexGrow: 1, }, menuButton: { marginRight: theme.spacing(2), }, title: { flexGrow: 1, }, })); class NavMenu extends React.Component { constructor(props) { super(props); this.state = { isOpen: false }; } render() { const classes = useStyles(); return ( <div className={classes.root}> <AppBar position="static"> <Toolbar>