Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Apache Druid ReactTableInputs

From Leeroopedia
Revision as of 14:15, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Apache_Druid_ReactTableInputs.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains Web_Console, Table_Filtering
Last Updated 2026-02-10 10:00 GMT

Overview

ReactTableInputs provides a set of filter input components for react-table column headers, supporting text search with multiple filter modes, suggestible multi-select, and boolean filtering.

Description

The module exports three components: GenericFilterInput renders a debounced text input with a mode selector popover supporting contains, exact match, regex, and comparison operators; suggestibleFilterInput is a higher-order function that wraps GenericFilterInput with a popover of predefined suggestion values for multi-select toggling; and BooleanFilterInput renders a simple HTML select dropdown with true/false/show-all options. All components use the TableFilter utility for encoding and decoding filter mode/needle pairs in the react-table filter value string.

Usage

Used as the filterInput component for react-table column definitions throughout the Druid web console, providing consistent filtering behavior across datasources, segments, tasks, supervisors, and other tabular views.

Code Reference

Source Location

Signature

export function GenericFilterInput(props: FilterRendererProps): JSX.Element;

export function suggestibleFilterInput(
  suggestions: string[],
): (props: FilterRendererProps) => JSX.Element;

export function BooleanFilterInput(props: FilterRendererProps): JSX.Element;

Import

import { GenericFilterInput, suggestibleFilterInput, BooleanFilterInput } from './react-table/react-table-inputs';

I/O Contract

Inputs

Name Type Required Description
column Column Yes The react-table Column object providing header metadata
filter any Yes The current filter value string (encoded mode and needle)
onChange ReactTableFunction Yes Callback to update the filter value
key string No React key for the filter input element

Outputs

Name Type Description
JSX.Element InputGroup or HTMLSelect A filter input component rendered in the react-table column header

Usage Examples

Using GenericFilterInput in a column definition

const columns = [
  {
    Header: 'Datasource',
    accessor: 'datasource',
    Filter: GenericFilterInput,
  },
  {
    Header: 'Type',
    accessor: 'type',
    Filter: suggestibleFilterInput(['index_parallel', 'index_realtime', 'compact']),
  },
  {
    Header: 'Active',
    accessor: 'active',
    Filter: BooleanFilterInput,
  },
];

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment