Skip to content

Commit 98a2ca9

Browse files
committed
Fix sortFields type inconsistency
1 parent 7d12592 commit 98a2ca9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ Other utils that are used across multiple components can be found in the higher-
7878

7979
### Component Types
8080

81+
Many components will implement their own TypeScript types or interfaces to reduce errors and improve code readability. In some cases, these types are defined directly in the component file. In cases where there are many types for a set of components, there may be a `types.tsx` file inside the component folder (e.g. `SearchUI/types.tsx`).
82+
83+
Most components also have their own props interface defined. Note that this interface should usually be uniquely named and exported so that it can be used inside the component's storybook file.
84+
8185
### Exporting Components
8286

8387
Any component that you want to be usable when this library is imported as a third-party node module must be added to the exports list in `src/index.ts`.

src/components/data-display/SearchUI/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export interface SearchState extends SearchUIContainerProps {
396396
* Optional props from SearchUIContainerProps that are required by SearchState
397397
*/
398398
setProps: (value: any) => any;
399-
sortFields: string[];
399+
sortFields: (string | undefined | null)[];
400400
sortKey: string;
401401
skipKey: string;
402402
limitKey: string;

0 commit comments

Comments
 (0)