material-ui

Material-ui v1 Input focus style override

可紊 提交于 2021-01-23 01:45:15
问题 I'm trying to override the styling of the Input component when it is on focus via class name overide. I have tried the following: const style = theme => ({ input: { width: '20%', borderRadius: 4, backgroundColor: 'white', border: '1px solid #ced4da', fontSize: 20, '&:focus': { width: '40%', borderColor: '#80bdff', boxShadow: '0 0 0 0.2rem rgba(0,123,255,.25)', }, } }); class test extends Component { // UI render() { const {classes} = this.props return ( <AppBar position="static"> <Toolbar>

Navigate a material-ui list with arrow keys

这一生的挚爱 提交于 2021-01-22 05:36:21
问题 I'm using material-ui to make an electron application. Some screens are master-detail and I'm using a list to show the overview. I would like to make it possible to navigate this list with arrow keys. Is there a builtin option to do this? If it is not built in, what is the best approach to make this? Update: I made my own component for now. Not sure if it is the best solution, but seems to work: export default function NavigateList(props) { const { children, data, ...other } = props; const

How to disable box-shadows globally for all material-ui React components?

三世轮回 提交于 2021-01-21 12:04:57
问题 I need to disable the default box-shadows for most material-ui components. Right now I'm doing this by setting the style manually for each component, like this: <FloatingActionButton style={{boxShadow: "none"}} /> Is there a way to do this globally, maybe using a theme setting? 回答1: You can do it by component like this: <AppBar elevation={0} /> 回答2: In the configuration object of a material-ui theme, you can see the shadows property, override it in your code and just leave the none value,

How to disable box-shadows globally for all material-ui React components?

不想你离开。 提交于 2021-01-21 12:04:32
问题 I need to disable the default box-shadows for most material-ui components. Right now I'm doing this by setting the style manually for each component, like this: <FloatingActionButton style={{boxShadow: "none"}} /> Is there a way to do this globally, maybe using a theme setting? 回答1: You can do it by component like this: <AppBar elevation={0} /> 回答2: In the configuration object of a material-ui theme, you can see the shadows property, override it in your code and just leave the none value,

React Material UI open modal from within autocomplete lose focus

痴心易碎 提交于 2021-01-21 08:26:45
问题 I'm using the material-ui lib and I need to have an autocomplete where each item inside that autocomplete is clickable and opens a modal. The structure in general is: const ModalBtn = () => { ... return ( <> <button ... (on click set modal to open) <Modal ... </> ); } const AutoCompleteWithBtns = () => { return ( <Autocomplete renderTags={(value, getTagProps) => value.map((option, index) => <ModalBtn />) } ... /> ); } Note that the ModalBtn is a component that cannot be divided into two

How get data from material-ui TextField, DropDownMenu components?

允我心安 提交于 2021-01-20 14:34:05
问题 I create form, I have several TextField, DropDownMenu material-ui components included, question is how I can collect all data from all TextFields, DropDownMenus in one obj and sent it on server. For TextField it has TextField.getValue() Returns the value of the input. But I can`t understand how to use it. var React = require('react'), mui = require('material-ui'), Paper = mui.Paper, Toolbar = mui.Toolbar, ToolbarGroup = mui.ToolbarGroup, DropDownMenu = mui.DropDownMenu, TextField = mui

How to show split header in the material table having nested group of data in angular

半城伤御伤魂 提交于 2021-01-09 07:28:58
问题 I am having trouble displaying data in the material table when the data is coming as a nested array of objects. I would like to display the table which is currently displayed in the stackblitz. If I changed the existing data with my newData variable it will start breaking whole table. Can anybody guide me How I can achieve split header function with group of nested data in the material table? I would like to achieve something like this. Here is my stackblitz. https://stackblitz.com/edit

How to show split header in the material table having nested group of data in angular

主宰稳场 提交于 2021-01-09 07:25:56
问题 I am having trouble displaying data in the material table when the data is coming as a nested array of objects. I would like to display the table which is currently displayed in the stackblitz. If I changed the existing data with my newData variable it will start breaking whole table. Can anybody guide me How I can achieve split header function with group of nested data in the material table? I would like to achieve something like this. Here is my stackblitz. https://stackblitz.com/edit

How to show split header in the material table having nested group of data in angular

强颜欢笑 提交于 2021-01-09 07:24:14
问题 I am having trouble displaying data in the material table when the data is coming as a nested array of objects. I would like to display the table which is currently displayed in the stackblitz. If I changed the existing data with my newData variable it will start breaking whole table. Can anybody guide me How I can achieve split header function with group of nested data in the material table? I would like to achieve something like this. Here is my stackblitz. https://stackblitz.com/edit

How to show split header in the material table having nested group of data in angular

与世无争的帅哥 提交于 2021-01-09 07:23:53
问题 I am having trouble displaying data in the material table when the data is coming as a nested array of objects. I would like to display the table which is currently displayed in the stackblitz. If I changed the existing data with my newData variable it will start breaking whole table. Can anybody guide me How I can achieve split header function with group of nested data in the material table? I would like to achieve something like this. Here is my stackblitz. https://stackblitz.com/edit