search-ui icon indicating copy to clipboard operation
search-ui copied to clipboard

Configurable field support for Result component

Open JasonStoltz opened this issue 5 years ago • 3 comments

The Results component should accept a prop called 'displayFields` which would allow users to specify which fields from their result object to display. The parameter should be able to express:

  1. Order
  2. field
  3. field label

Example:

result:

{
  title: {title value},
  date: {date value},
  cats: {cats value }
  isbn: {isbn value}
}

Component using new field

<Results
  displayFields={[
    { field: "title" },
    { field:  "cats", label: "Categories" },
    { field: "date" }
  ]}
/>

Result in HTML

Title: {title value}
Categories: {cats value}
Date: {date value}

JasonStoltz avatar Oct 31 '19 18:10 JasonStoltz

@JasonStoltz can i work on it , if no one else is occupied with it ?

PRASHANT1104 avatar Mar 04 '20 08:03 PRASHANT1104

@PRASHANT1104 That would be great.

JasonStoltz avatar Mar 04 '20 11:03 JasonStoltz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Is this issue still important to you? If so, please leave a comment and let us know. As always, thank you for your contributions.

botelastic[bot] avatar May 03 '20 11:05 botelastic[bot]