How to use update-input-width - 8 common examples

To help you get started, we’ve selected a few update-input-width 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 wojtekmaj / react-date-picker / src / DateInput / Input.jsx View on Github external
function onLoadingDone() {
    updateInputWidth(element);
  }
github wojtekmaj / react-date-picker / src / DateInput / Input.jsx View on Github external
onKeyUp={(event) => {
        updateInputWidth(event.target);

        if (onKeyUp) {
          onKeyUp(event);
        }
      }}
      placeholder={placeholder}
github wojtekmaj / react-time-picker / src / TimeInput / Input.jsx View on Github external
function onLoadingDone() {
    updateInputWidth(element);
  }
github wojtekmaj / react-date-picker / src / DateInput / Input.jsx View on Github external
ref={(ref) => {
        if (ref) {
          updateInputWidth(ref);
          updateInputWidthOnFontLoad(ref);
        }

        if (itemRef) {
          itemRef(ref, name);
        }
      }}
      required={required}
github wojtekmaj / react-time-picker / src / TimeInput / Input.jsx View on Github external
ref={(ref) => {
        if (ref) {
          updateInputWidth(ref);
          updateInputWidthOnFontLoad(ref);
        }

        if (itemRef) {
          itemRef(ref, name);
        }
      }}
      required={required}
github wojtekmaj / react-time-picker / src / TimeInput / Input.jsx View on Github external
onKeyUp={(event) => {
        updateInputWidth(event.target);

        if (onKeyUp) {
          onKeyUp(event);
        }
      }}
      placeholder={placeholder}
github wojtekmaj / react-time-picker / src / TimeInput / Input.jsx View on Github external
function updateInputWidthOnFontLoad(element) {
  if (!document.fonts) {
    return;
  }

  const font = getFontShorthand(element);

  if (!font) {
    return;
  }

  const isFontLoaded = document.fonts.check(font);

  if (isFontLoaded) {
    return;
  }

  function onLoadingDone() {
    updateInputWidth(element);
  }

  document.fonts.addEventListener('loadingdone', onLoadingDone);
github wojtekmaj / react-date-picker / src / DateInput / Input.jsx View on Github external
function updateInputWidthOnFontLoad(element) {
  if (!document.fonts) {
    return;
  }

  const font = getFontShorthand(element);

  if (!font) {
    return;
  }

  const isFontLoaded = document.fonts.check(font);

  if (isFontLoaded) {
    return;
  }

  function onLoadingDone() {
    updateInputWidth(element);
  }

  document.fonts.addEventListener('loadingdone', onLoadingDone);

update-input-width

A function that given input element, updates its width to fit its content.

MIT
Latest version published 1 year ago

Package Health Score

56 / 100
Full package analysis

Popular update-input-width functions