diff --git a/src/StructuredYson/StructuredYson.tsx b/src/StructuredYson/StructuredYson.tsx index 76741cf..a0ad2cb 100644 --- a/src/StructuredYson/StructuredYson.tsx +++ b/src/StructuredYson/StructuredYson.tsx @@ -356,9 +356,16 @@ export class StructuredYson extends React.PureComponent { if (renderToolbar) { return renderToolbar({ - onFilterChange: this.onFilterChange, + filter, + matchIndex: matchIndex, + matchedRows: matchedRows, + allMatchPaths: allMatchPaths, onExpandAll: this.onExpandAll, onCollapseAll: this.onCollapseAll, + onFilterChange: this.onFilterChange, + onNextMatch: this.onNextMatch, + onPrevMatch: this.onPrevMatch, + onEnterKeyDown: this.onEnterKeyDown, isCollapsed, }); } diff --git a/src/StructuredYson/types.ts b/src/StructuredYson/types.ts index 4dd323c..0d532c2 100644 --- a/src/StructuredYson/types.ts +++ b/src/StructuredYson/types.ts @@ -22,9 +22,16 @@ export type UnipikaSettings = { export type CollapseIconType = 'chevron'; export interface ToolbarProps { - onFilterChange: (filter: string) => void; + filter: string; + matchIndex: number; + matchedRows: Array; + allMatchPaths: Array; onExpandAll: () => void; onCollapseAll: () => void; + onFilterChange: (filter: string) => void; + onNextMatch: (event: unknown, diff?: number) => void; + onPrevMatch: () => void; + onEnterKeyDown: (e: React.KeyboardEvent) => void; isCollapsed: boolean; }