Skip to content

Commit

Permalink
fix(comp:modal): draggable of modal with custom header slot doesn't work
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Jul 24, 2024
1 parent 4e5cdcc commit 67882ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/components/_private/header/src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import type { FunctionalComponent } from 'vue'

import { isString } from 'lodash-es'

import { convertArray } from '@idux/cdk/utils'
import { convertArray, getFirstValidNode } from '@idux/cdk/utils'
import { IxHeader } from '@idux/components/header'

const Header: FunctionalComponent<HeaderProps> = (props, { slots }) => {
if (slots.header) {
return slots.header(props)
return getFirstValidNode(slots.header(props))
}

if (!props.header && !props.closable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ exports[`ProTransfer > table transfer render work 1`] = `
class="ix-table ix-table-auto-height ix-table-borderless ix-table-md ix-pro-table ix-pro-transfer-table-content"
>
<!---->
<div
class="ix-table-container ix-table-fixed-layout ix-table-inset-shadow"
>
Expand Down Expand Up @@ -1208,9 +1206,7 @@ exports[`ProTransfer > table transfer render work 1`] = `
class="ix-table ix-table-auto-height ix-table-borderless ix-table-md ix-pro-table ix-pro-transfer-table-content"
>
<!---->
<div
class="ix-table-container ix-table-fixed-layout ix-table-inset-shadow"
>
Expand Down

0 comments on commit 67882ab

Please sign in to comment.