MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / renderBottomContent

Method renderBottomContent

core/src/components/input/input.tsx:708–727  ·  view source on GitHub ↗

* Responsible for rendering helper text, * error text, and counter. This element should only * be rendered if hint text is set or counter is enabled.

()

Source from the content-addressed store, hash-verified

706 * be rendered if hint text is set or counter is enabled.
707 */
708 private renderBottomContent() {
709 const { counter, helperText, errorText, maxlength } = this;
710
711 /**
712 * undefined and empty string values should
713 * be treated as not having helper/error text.
714 */
715 const hasHintText = !!helperText || !!errorText;
716 const hasCounter = counter === true && maxlength !== undefined;
717 if (!hasHintText && !hasCounter) {
718 return;
719 }
720
721 return (
722 <div class="input-bottom">
723 {this.renderHintText()}
724 {this.renderCounter()}
725 </div>
726 );
727 }
728
729 private renderLabel() {
730 const { label, labelTextId } = this;

Callers 1

renderMethod · 0.95

Calls 2

renderHintTextMethod · 0.95
renderCounterMethod · 0.95

Tested by

no test coverage detected