Skip to content

Commit

Permalink
chore: downgrade floating-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 16, 2023
1 parent 5d2448e commit 113c5ee
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"floating-vue": "workspace:*"
},
"devDependencies": {
"@floating-ui/dom": "^1.3.0",
"@floating-ui/dom": "^0.1.10",
"@iconify-json/lucide": "^1.1.101",
"@vue/eslint-config-standard": "^8.0.1",
"@vue/shared": "^3.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/floating-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dist"
],
"dependencies": {
"@floating-ui/dom": "^1.3.0",
"@floating-ui/dom": "^0.1.10",
"vue-resize": "^2.0.0-alpha.1"
},
"peerDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions packages/floating-vue/src/components/Popper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
shift,
flip,
arrow,
getOverflowAncestors,
getScrollParents,
size,
} from '@floating-ui/dom'
import { supportsPassive, isIOS } from '../util/env'
Expand Down Expand Up @@ -643,10 +643,10 @@ export default () => defineComponent({
options.middleware.push(size({
boundary: this.boundary,
padding: this.overflowPadding,
apply: ({ availableWidth, availableHeight }) => {
apply: ({ width, height }) => {
// Apply and re-compute
this.$_innerNode.style.maxWidth = availableWidth != null ? `${availableWidth}px` : null
this.$_innerNode.style.maxHeight = availableHeight != null ? `${availableHeight}px` : null
this.$_innerNode.style.maxWidth = width != null ? `${width}px` : null
this.$_innerNode.style.maxHeight = height != null ? `${height}px` : null
},
}))
}
Expand Down Expand Up @@ -727,8 +727,8 @@ export default () => defineComponent({
// Scroll
if (!this.positioningDisabled) {
this.$_registerEventListeners([
...getOverflowAncestors(this.$_referenceNode),
...getOverflowAncestors(this.$_popperNode),
...getScrollParents(this.$_referenceNode),
...getScrollParents(this.$_popperNode),
], 'scroll', () => {
this.$_computePosition()
})
Expand Down
18 changes: 4 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 113c5ee

Please sign in to comment.