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

add empty-[set] and empty-[set]-value attributes

parent b7f5b71e
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ Attributes
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``).
``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.
......
......@@ -136,6 +136,33 @@ Attributes
Set the alt for the field ``[field]``.
``empty-[set]``
~~~~~~~~~~~~~~~
*Available from version 0.17*
Name of the widget to display when all the fields in ``[set]`` are empty.
``empty-[set]-value``
~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.17*
Value to pass to the empty widget if all fields in ``[set]`` are empty. It is accessible in ``${value}``
.. code:: html
<solid-display
data-src="http://server/users/"
fields="fullname(first_name, last_name)"
empty-fullname="no-name-widget"
empty-fullname-value="add-name"
></solid-display>
<solid-widget name="no-name-widget">
<template>
<small>No fullname filled in. <solid-link next="${value}">click here to add one</solid-link></small>
</template>
</solid-widget>
``multiple-[field]``
~~~~~~~~~~~~~~~~~~~~
Allows to display the container ``[field]`` nested in the current resource.
......
......@@ -83,6 +83,14 @@ List of attributes (core framework)
~~~~~~~~~~~~~~~~~~~~
* :ref:`widget-mixin <widget-mixin>`
``empty-[set]``
~~~~~~~~~~~~~~~
* :ref:`widget-mixin <widget-mixin>`
``empty-[set]-value``
~~~~~~~~~~~~~~~~~~~~~
* :ref:`widget-mixin <widget-mixin>`
``empty-value``
~~~~~~~~~~~~~~~
* :ref:`list-mixin <list-mixin>`
......
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