JiraTUI Logo

Documentation for Users

  • Installation
  • Initial Configuration
  • Usage
  • JiraTUI Settings

Documentation for Developers

  • Getting Started
  • Concepts
  • Reference
    • API
    • API Client
    • API Controller
    • Models
    • Configuration
    • Widgets
      • Screen Widgets
      • Common ADF Widgets
      • Common Base Widgets
      • Common Users Widgets
      • Common Widgets
      • Filters Widgets
      • Search
        • DataTableSearchInput
        • IssuesSearchResultsTable
        • SearchResultsContainer
      • Widgets for Creating Work Items
      • Widgets for Updating Work Items
      • Related Work Items
      • Work Item Web Links
      • Work Item Comments
      • Work Item Attachments
  • How-To Guides
JiraTUI
  • Reference
  • Search
  • View page source

Search

This module contains widgets for implementing work item search functionality.

DataTableSearchInput

class DataTableSearchInput(placeholder: str | None = None, border_title: str | None = None, hide: bool | None = True)

Bases: textual.widgets.Input

An input field that allows users to perform searches in the currently active search results page.

The feature to search within search results pages is controlled by these settings:

  • search_results_page_filtering_enabled

  • search_results_page_filtering_minimum_term_length

Initialization

Initialise the Input widget.

Parameters:
  • value – An optional default value for the input.

  • placeholder – Optional placeholder text for the input.

  • highlighter – An optional highlighter for the input.

  • password – Flag to say if the field should obfuscate its content.

  • restrict – A regex to restrict character inputs.

  • type – The type of the input.

  • max_length – The maximum length of the input, or 0 for no maximum length.

  • suggester – [Suggester][textual.suggester.Suggester] associated with this input instance.

  • validators – An iterable of validators that the Input value will be checked against.

  • validate_on – Zero or more of the values “blur”, “changed”, and “submitted”, which determine when to do input validation. The default is to do validation for all messages.

  • valid_empty – Empty values are valid.

  • select_on_focus – Whether to select all text on focus.

  • name – Optional name for the input widget.

  • id – Optional ID for the widget.

  • classes – Optional initial classes for the widget.

  • disabled – Whether the input is disabled or not.

  • tooltip – Optional tooltip.

  • compact – Enable compact style (without borders).

total: textual.reactive.Reactive[int | None]

‘reactive(…)’

Keeps track of the total number of records after filtering them based on the input value.

check_action(action: str, parameters: tuple[object, ...]) → bool | None

Check if an action may run.

IssuesSearchResultsTable

class IssuesSearchResultsTable

Bases: textual.widgets.DataTable

The widget that displays the results of a search.

This widget provides a reactive attribute, search_results, that contains the issues that the table will display.

The widget can post a message of type IssuesSearchResultsTable.WorkItemDeleted when the user deletes an item from the table.

Important

Deleting an item will delete the item from Jira. After a successful deletion the datatable will remove the row related to the item that was deleted. In addition, the widget will send the message IssuesSearchResultsTable.WorkItemDeleted to notify other widgets so they can update the relevant widgets.

Initialization

Initializes a widget to display tabular data.

Parameters:
  • show_header – Whether the table header should be visible or not.

  • show_row_labels – Whether the row labels should be shown or not.

  • fixed_rows – The number of rows, counting from the top, that should be fixed and still visible when the user scrolls down.

  • fixed_columns – The number of columns, counting from the left, that should be fixed and still visible when the user scrolls right.

  • zebra_stripes – Enables or disables a zebra effect applied to the background color of the rows of the table, where alternate colors are styled differently to improve the readability of the table.

  • header_height – The height, in number of cells, of the data table header.

  • show_cursor – Whether the cursor should be visible when navigating the data table or not.

  • cursor_foreground_priority – If the data associated with a cell is an arbitrary renderable with a set foreground color, this determines whether that color is prioritized over the cursor component class or not.

  • cursor_background_priority – If the data associated with a cell is an arbitrary renderable with a set background color, this determines whether that color is prioritized over the cursor component class or not.

  • cursor_type – The type of cursor to be used when navigating the data table with the keyboard.

  • cell_padding – The number of cells added on each side of each column. Setting this value to zero will likely make your table very hard to read.

  • name – The name of the widget.

  • id – The ID of the widget in the DOM.

  • classes – The CSS classes for the widget.

  • disabled – Whether the widget is disabled or not.

class WorkItemDeleted(work_item_key: str)

Bases: textual.message.Message

watch_search_results(response: jiratui.models.JiraIssueSearchResponse | None = None) → None

Watches the content of a reactive attribute that contains the details of the work item selected by the user.

Parameters:

response – an instance of JiraIssueSearchResponse with the work item selected by the user.

Returns:

None

on_data_table_row_selected(event: textual.widgets.DataTable.RowSelected) → None

Fetches the details of the currently-selected item.

on_data_table_row_highlighted(event: textual.widgets.DataTable.RowHighlighted) → None

Stores the key of the currently-selected item.

action_open_issue_in_browser() → None

Opens the currently-selected item in the default browser.

action_delete_work_item() → None

Deletes the currently-selected item.

check_action(action: str, parameters: tuple[object, ...]) → bool | None

Check if an action may run.

SearchResultsContainer

class SearchResultsContainer(*args, **kwargs)

Bases: textual.containers.Container

The container that holds the DataTable widget with the search results.

This widget provides a reactive attribute called pagination. The attribute accepts a dictionary with the details of the search results’ pagination. This includes current_page_number and total. When this attribute is updated the widget will update the legend in the border subtitle to display the number of results and the page number.

Initialization

Initialize a Widget.

Parameters:
  • children – Child widgets.

  • name – The name of the widget.

  • id – The ID of the widget in the DOM.

  • classes – The CSS classes for the widget.

  • disabled – Whether the widget is disabled or not.

  • markup – Enable content markup?

pagination: textual.reactive.Reactive[dict | None]

‘reactive(…)’

Reactive attribute that contains pagination details associated to the search results. This is used setting the widget’s border subtitle with the page number and total records in the result.

Previous Next

© Copyright 2026, Gaston Tagni.

Built with Sphinx using a theme provided by Read the Docs.