fix: ordered by attachment to table header
This commit is contained in:
parent
de4060b86d
commit
432a1ab74a
1 changed files with 3 additions and 4 deletions
|
|
@ -79,12 +79,11 @@ const Header = () => {
|
|||
})
|
||||
|
||||
const attachOrderedByToComplexHeader = header => {
|
||||
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)
|
||||
|
||||
if (!R.isNil(orderedBy) && R.equals(name, orderedBy.code)) {
|
||||
try {
|
||||
spanChild.props.children = R.append(' -', spanChild.props.children)
|
||||
return cloneHeader
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue