-
What's a recommended way to toggle middleware dynamically? Say, for example,
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
https://floating-ui.com/docs/computePosition#conditional It works like Rollup plugins where falsy values are filtered out. middleware: [
props.autoPlacement && autoPlacement(),
offset({
mainAxis: 10
})
] |
Beta Was this translation helpful? Give feedback.
-
Trying that out, I have a TS error:
I see in the doc link, using the suggested type:
But how to apply this? |
Beta Was this translation helpful? Give feedback.
https://floating-ui.com/docs/computePosition#conditional
It works like Rollup plugins where falsy values are filtered out.