Cm Component Reference

Table of Contents


Introduction

Syntax

tml`
	<Cm>message content</Cm>
	<Cm hasMsg=stateVarName>message content</>
	<Cm hasMsg=stateVarName />
`

The Cm component represents a message within a Cr Component (a row within a Card). It displays a message that spans the row under the row content but within the row boundaries. By default, the message is indented by the width of the first label in the row to visually align the message with the computed values.

The Cm component can have a hasMsg attribute, which must have a single state variable
ID as the value. If the state variable specified by hasMsg has a truthy value, then the message is displayed. Otherwise, the message is hidden and the message area within the row disappears. If a Cm component has a hasMsg attribute but no children, then the value of the state variable specified by hasMsg is used as the message when not null. So:

<Cm hasMsg=stateVarName />

is equivalent to:

<Cm hasMsg=stateVarName>{{|stateVarName|}}</Cm>

Attributes

Instance methods

These methods are intended to be used by parent components to dynamically change the properties of the rendered components without re-rendering.

Inherited methods

Children

The Cm component accepts any content. However, the Cm component is intended for short messaged within a row. Large messages will likely make the row appear odd.

DOM element properties

If the hasMsg attribute is present and prevents row rendering, then the component will render a marker <span>; see the When Component Reference. If the hasMsg attribute is not present and the component has no children, then nothing is rendered.

If there is a message: