Commit 8ab2d8b0 by Peter Holmberg

fix mutability bug, removed unused constructor

parent d360d8ce
...@@ -17,11 +17,6 @@ export interface OptionWithDescription { ...@@ -17,11 +17,6 @@ export interface OptionWithDescription {
} }
class DescriptionPicker extends Component<Props, any> { class DescriptionPicker extends Component<Props, any> {
constructor(props) {
super(props);
this.state = {};
}
render() { render() {
const { optionsWithDesc, onSelected, value, disabled, className } = this.props; const { optionsWithDesc, onSelected, value, disabled, className } = this.props;
......
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import { DataSourcePermission } from '../../types'; import { DataSourcePermission } from 'app/types';
import { dataSourceAclLevels, DataSourcePermissionLevel } from '../../types/acl'; import { dataSourceAclLevels, DataSourcePermissionLevel } from 'app/types/acl';
import DescriptionPicker from '../../core/components/Picker/DescriptionPicker'; import DescriptionPicker from '../../core/components/Picker/DescriptionPicker';
export interface Props { export interface Props {
...@@ -41,7 +41,7 @@ export class DataSourcePermissionsList extends PureComponent<Props> { ...@@ -41,7 +41,7 @@ export class DataSourcePermissionsList extends PureComponent<Props> {
render() { render() {
const { items } = this.props; const { items } = this.props;
const permissionLevels = dataSourceAclLevels; const permissionLevels = [...dataSourceAclLevels];
permissionLevels.push({ value: DataSourcePermissionLevel.Admin, label: 'Admin', description: '' }); permissionLevels.push({ value: DataSourcePermissionLevel.Admin, label: 'Admin', description: '' });
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment