Skip to content

Commit

Permalink
Fix onPress -> onClick on non-Button elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrause committed Jan 16, 2025
1 parent af5b30f commit ff30e9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/components/tables/DataTable/DataTableEager.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import cx from '../../../../util/componentUtil.ts';
import { differenceInDays } from 'date-fns';
import * as React from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import cx from '../../../../util/componentUtil.ts';
import { classNames as cx } from '../../../../util/componentUtil.ts';
import type * as React from 'react';

import { Icon } from '../../../graphics/Icon/Icon.tsx';
Expand Down
10 changes: 5 additions & 5 deletions src/components/tables/MultiSearch/MultiSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export const Filters = (props: FiltersProps) => {
tabIndex={0}
className="clear-all"
onKeyDown={onRemoveAllFilters}
onPress={onRemoveAllFilters}
onClick={onRemoveAllFilters}
>
Clear all
</span>
Expand Down Expand Up @@ -561,7 +561,7 @@ export const SearchInput = (props: SearchInputProps) => {
role="button"
tabIndex={0}
className={cx('bk-search-input', className, { 'bk-search-input--active': isFocused })}
onPress={onWrapperClick}
onClick={onWrapperClick}
onKeyDown={onWrapperKeyDown}
>
<Icon icon="search" className="bk-search-input__search-icon"/>
Expand Down Expand Up @@ -1350,7 +1350,7 @@ export const MultiSearch = (props: MultiSearchProps) => {
onKeyDown={onInputKeyDown}
onChange={onInputChange}
onFocus={onSearchInputFocus}
onPress={onClick}
onClick={onClick}
disabled={disabled}
/>
);
Expand Down Expand Up @@ -1395,7 +1395,7 @@ export const MultiSearch = (props: MultiSearchProps) => {
inputRef={inputRef}
fields={fields}
// popperOptions={popperOptions}
onPress={onFieldClick}
onClick={onFieldClick}
onOutsideClick={onOutsideClick}
/>
);
Expand Down Expand Up @@ -1594,7 +1594,7 @@ export const MultiSearch = (props: MultiSearchProps) => {
inputRef={inputRef}
operators={field.operators}
// popperOptions={popperOptions}
onPress={onOperatorClick}
onClick={onOperatorClick}
onOutsideClick={onOutsideClick}
operatorInfo={field.operatorInfo}
/>
Expand Down

0 comments on commit ff30e9a

Please sign in to comment.