anura-number

<anura-number adapter="some-adapter" source="123"></anura-number>

A very simple number search field with min/max restrictions.

Screenshot of anura-number

Attributes

adapter

required: yes, live: no, default: -

With which adapter to talk to (to load the values from)

<anura-number adapter="#my-adapter"></anura-number>

source

required: yes, live: on-load, default: -

What metadata field to query in order to get the title (and sumbit the value). The value type will depend on the adapter that you're using (usually an ID or a UUID)

<anura-number source="description"></anura-number>

value

required: no, live: set by component, default: -

Will only be written to by the component.

title

required: no, live: on-load, default: name of the metadata field

Override the title attribute with your own.

<anura-number title="Description"></anura-number>

type

required: no, live: set by component, default: -

The type of field that should be affected. This will be set by your adapter and is specific to the implementation. Don't touch this.

state

required: no, live: on-load, default: true

Whether the text search should maintain its state. This will use the components id to differentiate itself from other components. If you don't provide an ID, a hash of the component will be used. Set it to false to not keep any state at all.

Events

change

standard change event

Fired when the user changes the value of the input field

Parts

<input type="number" part="from-value" min="0"> - <input type="number" part="to-value" min="0">
<button part="text-button text-clear">
  <anura-icon part="text-icon text-icon-clear"></anura-icon>
</button>