Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
General documentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anastasia Kryukova
General documentation
Commits
ebceb81d
Commit
ebceb81d
authored
4 years ago
by
Clément
Browse files
Options
Downloads
Patches
Plain Diff
update: add solid-form-search
parent
54c6fd1f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/import_documentation/Components/SiB-Form-Search.rst
+60
-0
60 additions, 0 deletions
source/import_documentation/Components/SiB-Form-Search.rst
source/import_documentation/Mixins/filter-mixin.rst
+27
-1
27 additions, 1 deletion
source/import_documentation/Mixins/filter-mixin.rst
with
87 additions
and
1 deletion
source/import_documentation/Components/SiB-Form-Search.rst
0 → 100644
+
60
−
0
View file @
ebceb81d
solid-form-search
=================
Allows you to filter the contents of a component that uses the ``filter-mixin`` such as ``solid-display`` or ``solid-map``.
This must have a ``filtered-by`` attribute set to the id of the current ``solid-form-search``.
.. code:: html
<solid-form-search
id="my-filter"
fields="email"
label-email="search by email"
></solid-form-search>
<solid-display
data-src="http://example.com/users"
fields="username, last_name, email"
filtered-by="my-filter"
></solid-display>
Mixins
------
This component uses the following mixins:
- `widget-mixin <https://docs.startinblox.com/import_documentation/Mixins/widget-mixin.html>`__
Please check their documentation to know more about their capabilities.
Attributes
----------
``fields``
~~~~~~~~~~
List of fields used to perform the search.
``label-xyz``
~~~~~~~~~~~~~
When displaying a form, the default labels are the fields names of the model.
If you want something fancier, you can set this attribute.
i.e. ``label-username="Your name"``
``range-xyz``
~~~~~~~~~~~~~
URL of a container which list the accepted values
for the field ``xyz``. It’s particularly useful with a dropdown
field.
Widgets
-------
By default, the widget used is ``<solid-form-label-text>``. Cf the
`Widget Form <https://docs.startinblox.com/import_documentation/Widgets/form-widgets.html>`__ page for more info.
Events
-------
``formChange``
~~~~~~~~~~~~~~
Triggered when the form values change
This diff is collapsed.
Click to expand it.
source/import_documentation/Mixins/filter-mixin.rst
+
27
−
1
View file @
ebceb81d
...
@@ -14,8 +14,34 @@ Used by:
...
@@ -14,8 +14,34 @@ Used by:
Attributes
Attributes
----------
----------
``
search-fields
``
``
filtered-by
``
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
Target a `<sib-form-search>` used to filter current list of resource.
example:
.. code:: html
<solid-form-search
id="my-filter"
fields="email"
label-email="search by email"
></solid-form-search>
<solid-display
data-src="http://example.com/users"
fields="username, last_name, email"
filtered-by="my-filter"
></solid-display>
``search-fields`` **deprecated**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The properties you want to use to filter the list of resources.
The properties you want to use to filter the list of resources.
You can add multiple fields, separated by a comma.
You can add multiple fields, separated by a comma.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment