How to use the @react-md/transition.useFixedPositioning function in @react-md/transition

To help you get started, we’ve selected a few @react-md/transition examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mlaursen / react-md / packages / autocomplete / src / useAutoComplete.ts View on Github external
});

  useCloseOnOutsideClick({
    enabled: visible,
    element: inputRef.current,
    onOutsideClick: hide,
  });

  const {
    style,
    onEnter,
    onEntering,
    onEntered,
    onExited,
    updateStyle,
  } = useFixedPositioning({
    fixedTo: () => inputRef.current,
    anchor,
    onScroll(_event, { visible }) {
      if (!disableHideOnScroll || !visible) {
        hide();
      }
    },
    onResize: disableHideOnResize ? undefined : hide,
    width: listboxWidth,
    xMargin,
    yMargin,
    vwMargin,
    vhMargin,
    transformOrigin,
    preventOverlap,
    disableSwapping,

@react-md/transition

A package for working with react-md to use some simple transitions.

MIT
Latest version published 11 months ago

Package Health Score

66 / 100
Full package analysis