Files
spring-shell/spring-shell-docs/modules/ROOT/pages/components/ui/pathsearch.adoc
Janne Valkealahti 860c8dcb93 Migrate docs shell samples to asciinema
- Update antora settings
- Move cast files and remove old ones
- Switch shell svg's to asciinema
- Fixes #884
2023-10-14 15:45:09 +01:00

38 lines
1.2 KiB
Plaintext

[[using-shell-components-ui-pathsearch]]
= Path Search
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The path search component asks base directory for scan and optional search expression.
Results are shown in a single select list where user can pick a path.
`PathSearchConfig` can be used to customise component behaviour.
[source, java, indent=0]
----
include::{snippets}/UiComponentSnippets.java[tag=snippet9]
----
NOTE: Logic for search is passed as is into algorithms documented
in xref:appendices/techintro/searchalgorithm.adoc[Search Algorithms].
The following screencast shows typical output from a path search component:
[asciinema,rows=10]
----
include::example$component-path-search-1.cast[]
----
The context object is `PathSearchContext`. The following table describes its context variables:
[[pathsearchcontext-template-variables]]
.PathSearchContext Template Variables
|===
|Key |Description
|`pathViewItems`
|The items available for rendering search results.
|`model`
|The parent context variables (see xref:/components/ui/render.adoc#textcomponentcontext-template-variables[TextComponentContext Template Variables]).
|===