Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
setIsSearchMenuOpen(isAdvancedSearchOpen);
}, [isAdvancedSearchOpen]);

const onChangeHandler = (value: string, event: React.FormEvent<HTMLInputElement>) => {
const onChangeHandler = (event: React.FormEvent<HTMLInputElement>, value: string) => {
if (onChange) {
onChange(value, event);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface TextInputGroupMainProps extends Omit<React.HTMLProps<HTMLDivEle
/** Suggestion that will show up like a placeholder even with text in the input */
hint?: string;
/** Callback for when there is a change in the input field*/
onChange?: (value: string, event: React.FormEvent<HTMLInputElement>) => void;
onChange?: (event: React.FormEvent<HTMLInputElement>, value: string) => void;
/** Callback for when the input field is focused*/
onFocus?: (event?: any) => void;
/** Callback for when focus is lost on the input field*/
Expand Down Expand Up @@ -61,7 +61,7 @@ export const TextInputGroupMain: React.FunctionComponent<TextInputGroupMainProps
const textInputGroupInputInputRef = innerRef || ref;

const handleChange = (event: React.FormEvent<HTMLInputElement>) => {
onChange(event.currentTarget.value, event);
onChange(event, event.currentTarget.value);
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const TextInputGroupFilters: React.FunctionComponent = () => {
const showSearchIcon = !currentChips.length;

/** callback for updating the inputValue state in this component so that the input can be controlled */
const handleInputChange = (value: string, _event: React.FormEvent<HTMLInputElement>) => {
const handleInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const TextInputGroupUtilitiesAndIcon: React.FunctionComponent = () => {
const [inputValue, setInputValue] = React.useState('');

/** callback for updating the inputValue state in this component so that the input can be controlled */
const handleInputChange = (value: string, _event: React.FormEvent<HTMLInputElement>) => {
const handleInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const ComposableMultipleTypeaheadSelect: React.FunctionComponent = () =>
textInputRef.current?.focus();
};

const onTextInputChange = (value: string) => {
const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const ComposableTypeaheadSelect: React.FunctionComponent = () => {
textInputRef.current?.focus();
};

const onTextInputChange = (value: string) => {
const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
setIsSelected(false);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const AttributeValueFiltering: React.FunctionComponent = () => {
const textInputGroupRef = React.useRef<HTMLDivElement>();

/** callback for updating the inputValue state in this component so that the input can be controlled */
const handleInputChange = (value: string, _event: React.FormEvent<HTMLInputElement>) => {
const handleInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const AutoCompleteSearch: React.FunctionComponent = () => {
const textInputGroupRef = React.useRef<HTMLDivElement>();

/** callback for updating the inputValue state in this component so that the input can be controlled */
const handleInputChange = (value: string, _event: React.FormEvent<HTMLInputElement>) => {
const handleInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const SelectMultiTypeahead: React.FunctionComponent = () => {
setIsOpen(!isOpen);
};

const onTextInputChange = (value: string) => {
const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const SelectBasic: React.FunctionComponent = () => {
setFocusedItemIndex(null);
};

const onTextInputChange = (value: string) => {
const onTextInputChange = (_event: React.FormEvent<HTMLInputElement>, value: string) => {
setInputValue(value);
setFilterValue(value);
};
Expand Down