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