fix: ordered by attachment to table header

This commit is contained in:
Sérgio Salgado 2022-01-04 14:47:43 +00:00
parent de4060b86d
commit 432a1ab74a

View file

@ -79,12 +79,11 @@ const Header = () => {
})
const attachOrderedByToComplexHeader = header => {
const cloneHeader = R.clone(header)
const children = R.path(['props', 'children'], cloneHeader)
const spanChild = R.find(it => R.equals(it.type, 'span'), children)
if (!R.isNil(orderedBy) && R.equals(name, orderedBy.code)) {
try {
const cloneHeader = R.clone(header)
const children = R.path(['props', 'children'], cloneHeader)
const spanChild = R.find(it => R.equals(it.type, 'span'), children)
spanChild.props.children = R.append(' -', spanChild.props.children)
return cloneHeader
} catch (e) {