.. _solid-display:
solid-display
=============

Receives the URL of a resource or of a container of resources via its
``data-src`` attribute, and displays it.

Each field of the displayed
resources can be rendered by a specific widget, either custom or chosen
from the default ones. Filters and searching capabilities can be easily
added to interact with the list of data being displayed.

.. code:: html

   <solid-display
      data-src="https://server/users/"
      fields="first_name, last_name"
   ></solid-display>


To make the styling easier, if the ``solid-display`` shows a resource,
a ``solid-resource`` attribute is automatically added to the element.
If it's a container, a ``solid-container`` attribute is added.
Then, you can target your elements with the CSS rules ``solid-display[solid-resource]``
or ``solid-display[solid-container]``.


Mixins
------

This component uses the following mixins:
   * :ref:`counter-mixin <counter-mixin>`
   * :ref:`federation-mixin <federation-mixin>`
   * :ref:`filter-mixin <filter-mixin>`
   * :ref:`grouper-mixin <grouper-mixin>`
   * :ref:`highlighter-mixin <highlighter-mixin>`
   * :ref:`list-mixin <list-mixin>`
   * :ref:`next-mixin <next-mixin>`
   * :ref:`paginate-mixin <paginate-mixin>`
   * :ref:`required-mixin <required-mixin>`
   * :ref:`paginate-mixin <server-pagination-mixin>`
   * :ref:`sorter-mixin <sorter-mixin>`
   * :ref:`store-mixin <store-mixin>`
   * :ref:`widget-mixin <widget-mixin>`

Please check their documentation to know more about their capabilities.


Specific attributes
-------------------

``fields``
~~~~~~~~~~
   List of fields displayed.

   By default, all displayed fields are direct children of ``<solid-display>``.

   More details on its use below (in **widget-mixin attributes**).


``child-[field]``
~~~~~~~~~~~~~~~~~
   Add attribute ``[field]`` to all children.


Mixin attributes
-----------------

**From counter-mixin :**

.. include:: ../Mixins/counter-mixin.rst
   :start-line: 17

**From filter-mixin :**

.. include:: ../Mixins/filter-mixin.rst
   :start-line: 18

**From grouper-mixin :**

.. include:: ../Mixins/grouper-mixin.rst
   :start-line: 18

**From highlighter-mixin :**

.. include:: ../Mixins/highlighter-mixin.rst
   :start-line: 17

**From list-mixin :**

.. include:: ../Mixins/list-mixin.rst
   :start-line: 25

**From next-mixin :**

.. include:: ../Mixins/next-mixin.rst
   :start-line: 21

**From paginate-mixin :**

.. include:: ../Mixins/paginate-mixin.rst
   :start-line: 17

**From required-mixin :**

.. include:: ../Mixins/required-mixin.rst
   :start-line: 17

**From sorter-mixin :**

.. include:: ../Mixins/sorter-mixin.rst
   :start-line: 17

**From store-mixin :**

.. include:: ../Mixins/store-mixin.rst
   :start-line: 21
   :end-before: Events

**From widget-mixin :**

.. include:: ../Mixins/widget-mixin.rst
   :start-line: 18


Widgets
-------

   By default, the widget used is ``<solid-display-div>``. Cf the 
   :ref:`Widget <reference>` page for more info.


Events
-------

``resourceSelect``
~~~~~~~~~~~~~~~~~~~
   Triggered when an resource is clicked.