Resolve typescript errors
parent
5bc592a0d2
commit
c7607b047b
ui/src
dashboards/components
|
@ -29,7 +29,7 @@ class GraphOptionsCustomizableField extends PureComponent<Props, {}> {
|
|||
return (
|
||||
<div className="customizable-field">
|
||||
<div
|
||||
style={{opacity: opacity}}
|
||||
style={{opacity}}
|
||||
className={
|
||||
visible
|
||||
? 'customizable-field--label'
|
||||
|
|
|
@ -88,7 +88,7 @@ interface Props {
|
|||
isDragging: monitor.isDragging(),
|
||||
}))
|
||||
export default class GraphOptionsSortableField extends PureComponent<Props> {
|
||||
render() {
|
||||
public render() {
|
||||
const {
|
||||
internalName,
|
||||
displayName,
|
||||
|
|
|
@ -87,7 +87,6 @@ export class TableOptions extends PureComponent<Props, {}> {
|
|||
const orderedFields = addedFields.map((f, i) => {
|
||||
return {...f, order: i}
|
||||
})
|
||||
console.log('orderedFields', orderedFields)
|
||||
handleUpdateTableOptions({
|
||||
...tableOptions,
|
||||
fieldNames: orderedFields,
|
||||
|
|
|
@ -200,7 +200,7 @@ export const filterTableColumns = (data, fieldNames) => {
|
|||
|
||||
export const orderTableColumns = (data, fieldNames) => {
|
||||
const fieldsSortOrder = fieldNames.map(fieldName => {
|
||||
return data[0].findIndex(dataLabel => dataLabel == fieldName.internalName)
|
||||
return data[0].findIndex(dataLabel => dataLabel === fieldName.internalName)
|
||||
})
|
||||
const orderedData = map(data, row => {
|
||||
return row.map((v, j, arr) => arr[fieldsSortOrder[j]])
|
||||
|
|
Loading…
Reference in New Issue