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 => {
|
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)) {
|
if (!R.isNil(orderedBy) && R.equals(name, orderedBy.code)) {
|
||||||
try {
|
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)
|
spanChild.props.children = R.append(' -', spanChild.props.children)
|
||||||
return cloneHeader
|
return cloneHeader
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue