Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
General documentation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Documentation
General documentation
Commits
8b90ae3f
Commit
8b90ae3f
authored
Jan 08, 2021
by
Manon Bourgognon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sorted-by mixin doc
parent
a54d366b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
sorter-mixin.rst
source/import_documentation/Mixins/sorter-mixin.rst
+30
-0
attributes-list.rst
source/import_documentation/attributes-list.rst
+4
-0
No files found.
source/import_documentation/Mixins/sorter-mixin.rst
View file @
8b90ae3f
...
...
@@ -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
source/import_documentation/attributes-list.rst
View file @
8b90ae3f
...
...
@@ -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>`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment