anura-text

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

A very simple text search field (it mostly exists to look the same way anura-select & co look)

Screenshot of anura-text

Attributes

adapter

required: yes, live: no, default: -

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

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

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-text source="description"></anura-text>

value

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

Can be used to set an initial value, but will only be written to by the component afterwards.

title

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

Override the title attribute with your own.

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

placeholder

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

Override the placeholder attribute with your own.

<anura-text placeholder="Search something"></anura-text>

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.

drill-down

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

When enabled, these text values will become clickable in <anura-details>, whereafter this field will be filled with said text value, and trigger a search. Basically, this imitates the behaviour of <anura-select> for drill-down searches, but for text fields. It's off by default, as it makes litte sense for things like a description.

Events

change

standard change event

Fired when the user changes the value of the input field

Parts

<input part="text-value" >
<button part="text-button text-clear">
  <anura-icon part="text-icon text-icon-clear"></anura-icon>
</button>