From cd40ab50840baf7d05156fdc597acd87d60cb999 Mon Sep 17 00:00:00 2001 From: Dmitry Lyzo Date: Tue, 15 Feb 2022 23:45:52 +0300 Subject: [PATCH] Fix TypeScript error - add argument --- src/components/alphaPicker/AlphaPickerComponent.tsx | 2 +- src/components/search/SearchFields.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/alphaPicker/AlphaPickerComponent.tsx b/src/components/alphaPicker/AlphaPickerComponent.tsx index bf8b44d8a5..3c476bb13a 100644 --- a/src/components/alphaPicker/AlphaPickerComponent.tsx +++ b/src/components/alphaPicker/AlphaPickerComponent.tsx @@ -3,7 +3,7 @@ import React, { FunctionComponent, useEffect, useRef, useState } from 'react'; import AlphaPicker from './alphaPicker'; type AlphaPickerProps = { - onAlphaPicked?: () => void + onAlphaPicked?: (e: Event) => void }; // React compatibility wrapper component for alphaPicker.js diff --git a/src/components/search/SearchFields.tsx b/src/components/search/SearchFields.tsx index ed1bd02465..ab7718de30 100644 --- a/src/components/search/SearchFields.tsx +++ b/src/components/search/SearchFields.tsx @@ -31,7 +31,7 @@ const createInputElement = () => ({ const normalizeInput = (value = '') => value.trim(); type SearchFieldsProps = { - onSearch?: () => void + onSearch?: (query: string) => void }; // eslint-disable-next-line @typescript-eslint/no-empty-function