Skip to content

Create a entity search panel #39

@Zorin95670

Description

@Zorin95670

Description

We need to create a generic entity search panel component in catalog-ui.
This component will allow users to search/filter entities by displaying a set of input fields derived from the entity configuration.

For the first iteration, only text and number search inputs will be supported.


EntitySearchPanel

Responsibilities

  • Display a panel containing search inputs related to an entity.
  • Generate inputs dynamically based on the entity attribute configuration.
  • Reuse the existing form input components (Input Wrapper) created for form management.
  • Collect filter values entered by the user.
  • Emit a search event when the user triggers the search action.

Supported Search Input Types (initially)

  • text
  • number

Other input types will be added in future iterations.


Inputs (Props)

  • entityName (string, required)

    • Used to retrieve the entity configuration.
  • (Optional) initialFilters (object)

    • Initial filter values.

Outputs (Events)

  • search

    • Emitted when the Search button is clicked.
    • Payload: an object containing the filter values keyed by attribute name.

Example:

{
  name: 'John',
  age: 30
}

UI Requirements

  • Display one input per searchable attribute.
  • Inputs must reuse the existing Input Wrapper component.
  • Include a Search button at the bottom of the panel.
  • No advanced styling required at this stage.

Constraints

  • Component must be generic and entity-agnostic.

  • No direct API calls; only emit filter values.

  • Must rely on entity configuration to determine:

    • Which attributes are searchable
    • Which input type to use
  • Keep the component extensible for future input types and search behaviors.


Expected Outcome

  • A reusable EntitySearchPanel component exists in catalog-ui.
  • Dynamically renders text and number search inputs based on entity configuration.
  • Reuses existing form input components.
  • Emits a search event with the selected filter values when the Search button is clicked.
  • Ready for future enhancements (additional input types, advanced filters, auto-search, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions