Skip to content

Commit

Permalink
Add helperText prop to Filter interface
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslaw Szwajkowski <[email protected]>
  • Loading branch information
rszwajko committed Oct 19, 2023
1 parent 037c8c2 commit 1cfb488
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/src/components/Filter/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ export interface FilterTypeProps {
* Language to be used for locale sensitive sorting/filtering. Defaults to 'en'.
*/
resolvedLanguage: string;
/** Text that explains how to use the filter. */
helperText?: string | React.ReactNode;
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const FilterFromDef = ({
supportedValues={def.values}
supportedGroups={def.groups}
resolvedLanguage={resolvedLanguage}
helperText={def.helperText}
/>
)
);
Expand Down
2 changes: 2 additions & 0 deletions packages/common/src/utils/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
export interface EnumGroup {
groupId: string;
label: string;
Expand All @@ -20,6 +21,7 @@ export interface FilterDef {
// override default behavior if there are no filters provided by the user
// by default missing/empty filters result in positive match (vacuous truth)
defaultValues?: string[];
helperText?: string | React.ReactNode;
}

type OpenApiJsonPath = string | ((resourceData: unknown) => unknown);
Expand Down

0 comments on commit 1cfb488

Please sign in to comment.