From ef7a9b8d9e9f0c2fcd09e0e40c54c3f58829e47c Mon Sep 17 00:00:00 2001
From: Manon Bourgognon <manon.bourgognon@epitech.eu>
Date: Thu, 29 Apr 2021 11:20:52 +0200
Subject: [PATCH] add auto-range-[field] attribute documentation

---
 .../Components/Solid-Form-Search.rst          | 25 +++++++++++++++++++
 .../import_documentation/attributes-list.rst  |  4 +++
 2 files changed, 29 insertions(+)

diff --git a/source/import_documentation/Components/Solid-Form-Search.rst b/source/import_documentation/Components/Solid-Form-Search.rst
index 608fb27..20ab8b3 100644
--- a/source/import_documentation/Components/Solid-Form-Search.rst
+++ b/source/import_documentation/Components/Solid-Form-Search.rst
@@ -140,6 +140,31 @@ Attributes
          filtered-by="filter-multiselectautocomp"
       ></solid-display>
 
+
+.. _auto-range-field:
+``auto-range-[field]``
+~~~~~~~~~~~~~~~~~~~~~~~
+   *Available from version 0.17*
+
+   Allows to display a list of the ``field`` values in the ``solid-form-search`` dropdown for each resource included in the ``data-src``. Each value is dispalyed once.
+   It takes only a field that refer to a container.
+
+   In this example below, ``auto-range-skills ``attribute catches all skill values for all users in the ``data-src`` `data/list/users` and displays in the dropdown all skills once :
+   .. code:: html
+
+      <solid-form-search
+         id="filter-autorange"
+         fields="skills"
+         auto-range-skills
+      ></solid-form-search>
+      <solid-display
+         data-src="data/list/users.jsonld"
+         fields="username, skills"
+         multiple-skills
+         filtered-by="filter-autorange"
+      ></solid-display>
+      
+
 Widgets
 -------
 By default, the widget used is ``<solid-form-label-text>``. Cf the 
diff --git a/source/import_documentation/attributes-list.rst b/source/import_documentation/attributes-list.rst
index 699ad65..6f6adf0 100644
--- a/source/import_documentation/attributes-list.rst
+++ b/source/import_documentation/attributes-list.rst
@@ -14,6 +14,10 @@ List of attributes (core framework)
    * :ref:`solid-form <autocomplete-field-sf>`
    * :ref:`solid-form-search <autocomplete-field-sfs>`
 
+``auto-range-[field]``
+~~~~~~~~~~~~~~~~~~~~~~
+   * :ref:`solid-form-search <auto-range-field>`
+   
 ``autosave``
 ~~~~~~~~~~~~
    * :ref:`solid-form <autosave>`
-- 
GitLab