Skip to content

Search components only partially support multiple instances on a single page #5738

@alijaber-atmire

Description

@alijaber-atmire

Describe the bug

A clear and concise description of what the bug is. Include the version(s) of DSpace where you've seen this problem & what web browser you were using. Link to examples if they are public.

The DSpace search component only partially supports rendering multiple search components on a single page. Currently, only the sort and pagination query parameters are prefixed with a unique identifier per search component, so those work correctly when more than one search component is present.

However, the following parameters are not scoped per search instance and therefore collide when multiple search components share a page:

  • Route parameters: fixedFilterQuery, configuration
  • Query parameters: scope, query, dsoType, view, and filter queries (f.xxx)

Because these are not prefixed, two search components on the same page read/write the same parameters and interfere with each other.

To Reproduce

Steps to reproduce the behavior:

  1. Place two search components on the same page (e.g. two configured discovery searches).
  2. Apply a filter, change the scope, change the configuration, or enter a query in one of the components.
  3. Observe that the second search component is affected by the same scope / query / dsoType / view / f.xxx / configuration / fixedFilterQuery value, since these parameters are shared rather than scoped per component.

Expected behavior

All search-related route parameters (fixedFilterQuery, configuration) and query parameters (scope, query, dsoType, view, and filter queries f.xxx) should be prefixed with the per-component search instance identifier — the same way sort and pagination already are — so that multiple search components on a single page operate fully independently.

Related work

#5739
#5740

Metadata

Metadata

Labels

bugclaimed: AtmireAtmire team is working on this issue & will contribute backcomponent: Discoveryrelated to discovery search or browse system

Type

No fields configured for Bug.

Projects

Status
🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions