This commit is contained in:
Timothy Jaeryang Baek 2025-09-17 01:28:04 -05:00
parent c1f37d9aed
commit 1d0881e283

View file

@ -48,7 +48,32 @@ export function getSuggestionRenderer(Component: any, ComponentProps = {}) {
theme: 'transparent', theme: 'transparent',
placement: 'top-start', placement: 'top-start',
offset: [-10, -2], offset: [-10, -2],
arrow: false arrow: false,
popperOptions: {
strategy: 'fixed',
modifiers: [
{
name: 'preventOverflow',
options: {
boundary: 'viewport', // keep within the viewport
altAxis: true, // also prevent overflow on the cross axis (X)
tether: true,
padding: 8
}
},
{
name: 'flip',
options: {
boundary: 'viewport',
fallbackPlacements: ['top-end', 'bottom-start', 'bottom-end']
}
},
// Ensure transforms dont cause layout widening in some browsers
{ name: 'computeStyles', options: { adaptive: true } }
]
},
// Helps avoid accidental focus/hover “linking” from far away elements
interactiveBorder: 8
}); });
popup?.show(); popup?.show();
}, },