Skip to content
Snippets Groups Projects
Commit 8b90ae3f authored by Manon Bourgognon's avatar Manon Bourgognon
Browse files

Add sorted-by mixin doc

parent a54d366b
No related branches found
No related tags found
No related merge requests found
......@@ -41,4 +41,34 @@ Attributes
data-src="http://server/users/"
fields="username"
order-by-random
></solid-display>
``sorted-by``
~~~~~~~~~~~~~
Target a ``<solid-form-search>`` used to provide several options for the user to sort current list of resource.
The ``fields`` attribute of ``<solid-form-search>`` must at least contain ``field``.
``Field`` attribute contains the fields of the resource to be offered to the user for sorting the data.
``Order`` attribute allows you to propose 2 sorting orders: ascending (``asc`) and descending (``desc``).
By default, the order is ascending.
The ``<solid-display>`` cannot combine ``order-asc`` or ``order-desc`` attribute AND ``sorted-by`` attribute.
example:
.. code:: html
<solid-form-search
id="my-sorter"
fields="field, order"
enum-field="username, email"
enum-order="ascending order = asc, descending order = desc"
></solid-form-search>
<solid-display
data-src="http://server/users"
fields="username, last_name, email"
sorted-by="my-sorter"
></solid-display>
\ No newline at end of file
......@@ -192,6 +192,10 @@ List of attributes (core framework)
~~~~~~~~~~~~~~~~~~~~
* :ref:`required-mixin <required-mixin>`
``sorted-by``
~~~~~~~~~~~~~~~
* :ref:`sorter-mixin <sorter-mixin>`
``start-value-[field]``
~~~~~~~~~~~~~~~~~~~~~~~
* :ref:`solid-form-search <solid-form-search>`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment