How to use the uniforms.filterDOMProps function in uniforms

To help you get started, we’ve selected a few uniforms 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 vazco / uniforms / packages / uniforms-unstyled / src / SelectField.tsx View on Github external
allowedValues,
  checkboxes,
  disabled,
  fieldType,
  id,
  inputRef,
  label,
  name,
  onChange,
  placeholder,
  required,
  transform,
  value,
  ...props
}) => (
  <div>
    {label &amp;&amp; <label>{label}</label>}

    {/* TODO: Better handling of these props. */}
    {checkboxes || fieldType === Array
      ? renderCheckboxes({
          allowedValues,
          disabled,
          id,
          name,
          onChange,
          transform,
          value,
          fieldType,
        })
      : renderSelect({
          allowedValues,</div>
github vazco / uniforms / packages / uniforms-bootstrap3 / src / ListField.tsx View on Github external
initialCount,
  itemProps,
  label,
  name,
  removeIcon,
  showInlineError,
  value,
  ...props
}) =&gt; (
  <div>
    <div>
      {label &amp;&amp; (
        <div>
          <label>{label}&nbsp;</label>

          

          {!!(error &amp;&amp; showInlineError) &amp;&amp; (
            <span>{errorMessage}</span>
          )}
        </div></div></div>
github vazco / uniforms / packages / uniforms-bootstrap3 / src / ErrorsField.tsx View on Github external
const ErrorsField = (
  { className, children, ...props }: any,
  { uniforms: { error, schema } },
) =&gt;
  !error &amp;&amp; !children ? (
    nothing
  ) : (
    <div>
      <div>
        {children}

        {schema.getErrorMessages(error).map((message, index) =&gt; (
          <div>{message}</div>
        ))}
      </div>
    </div>
  );
github vazco / uniforms / packages / uniforms-bootstrap3 / src / SubmitField.tsx View on Github external
<input value="" type="submit" disabled="{disabled">
  );

  return (
    <div>
      {hasWrap &amp;&amp; (
        <label>
          &nbsp;
        </label>
      )}

      {hasWrap &amp;&amp; (
        </div>
github vazco / uniforms / packages / uniforms-bootstrap3 / src / NestField.tsx View on Github external
const Nest = ({
  children,
  className,
  error,
  errorMessage,
  fields,
  itemProps,
  label,
  name,
  showInlineError,
  ...props
}) =&gt; (
  <div>
    {label &amp;&amp; <label>{label}</label>}

    {!!(error &amp;&amp; showInlineError) &amp;&amp; (
      <span>{errorMessage}</span>
    )}

    {children
      ? injectName(name, children)
      : fields.map((key: any) =&gt; (
          
        ))}
  </div>
);
github vazco / uniforms / packages / uniforms-antd / src / DateField.tsx View on Github external
const Date = (props: any) =&gt;
  wrapField(
    props,
     props.onChange(value &amp;&amp; value.toDate())}
      placeholder={props.placeholder}
      ref={props.inputRef}
      value={props.value &amp;&amp; moment(props.value)}
      {...filterDOMProps(props)}
    /&gt;,
  );
github vazco / uniforms / packages / uniforms-material / src / LongTextField.tsx View on Github external
showInlineError,
  value,
  ...props
}) =&gt; (
   disabled || onChange(event.target.value)}
    placeholder={placeholder}
    ref={inputRef}
    value={value}
    {...filterDOMProps(props)}
  /&gt;
);
github vazco / uniforms / packages / uniforms-material / src / ListField.tsx View on Github external
children,
  dense,
  initialCount,
  itemProps,
  label,
  name,
  value,
  ...props
}) =&gt; [
  {label} : undefined
    }
    {...filterDOMProps(props)}
  &gt;
    {children
      ? value.map((item, index) =&gt;
          Children.map(children, child =&gt;
            React.cloneElement(child, {
              key: index,
              label: null,
              name: joinName(
                name,
                child.props.name &amp;&amp; child.props.name.replace('$', index),
              ),
            }),
          ),
        )
      : value.map((item, index) =&gt; (
github vazco / uniforms / packages / uniforms-unstyled / src / LongTextField.tsx View on Github external
const LongText = ({
  disabled,
  id,
  inputRef,
  label,
  name,
  onChange,
  placeholder,
  value,
  ...props
}) =&gt; (
  <div>
    {label &amp;&amp; <label>{label}</label>}

    <textarea name="{name}" id="{id}" disabled="{disabled}"> onChange(event.target.value)}
      placeholder={placeholder}
      ref={inputRef}
      value={value}
    /&gt;
  &lt;/div&gt;
);
</textarea></div>
github vazco / uniforms / packages / uniforms-antd / src / TextField.tsx View on Github external
const Text = props =&gt;
  wrapField(
    props,
    <input name="{props.name}" id="{props.id}" disabled="{props.disabled}"> props.onChange(event.target.value)}
      placeholder={props.placeholder}
      ref={props.inputRef}
      type={props.type}
      value={props.value}
      {...filterDOMProps(props)}
    /&gt;,
  );