mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix mutability bug, removed unused constructor
This commit is contained in:
parent
d360d8cebc
commit
8ab2d8b0b9
@ -17,11 +17,6 @@ export interface OptionWithDescription {
|
||||
}
|
||||
|
||||
class DescriptionPicker extends Component<Props, any> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
render() {
|
||||
const { optionsWithDesc, onSelected, value, disabled, className } = this.props;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { DataSourcePermission } from '../../types';
|
||||
import { dataSourceAclLevels, DataSourcePermissionLevel } from '../../types/acl';
|
||||
import { DataSourcePermission } from 'app/types';
|
||||
import { dataSourceAclLevels, DataSourcePermissionLevel } from 'app/types/acl';
|
||||
import DescriptionPicker from '../../core/components/Picker/DescriptionPicker';
|
||||
|
||||
export interface Props {
|
||||
@ -41,7 +41,7 @@ export class DataSourcePermissionsList extends PureComponent<Props> {
|
||||
|
||||
render() {
|
||||
const { items } = this.props;
|
||||
const permissionLevels = dataSourceAclLevels;
|
||||
const permissionLevels = [...dataSourceAclLevels];
|
||||
permissionLevels.push({ value: DataSourcePermissionLevel.Admin, label: 'Admin', description: '' });
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user