Skip to content

Commit

Permalink
chore: remove unnecessary dropdownRender and optional fields from Att…
Browse files Browse the repository at this point in the history
…ributeKey
  • Loading branch information
ahmadshaheer committed Sep 11, 2024
1 parent 074796f commit 3b78d09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ import { isArray, isEmpty, isEqual, isObject } from 'lodash-es';
import { ChevronDown, ChevronUp } from 'lucide-react';
import type { BaseSelectRef } from 'rc-select';
import {
JSXElementConstructor,
KeyboardEvent,
ReactElement,
useCallback,
useEffect,
useMemo,
Expand All @@ -54,15 +52,8 @@ import {
import { popupContainer } from 'utils/selectPopupContainer';
import { v4 as uuid } from 'uuid';

import ClientSideQBSearchDropdown from './ClientSideQBSearchDropdown';

export interface AttributeKey {
key: string;
dataType?: string;
type?: string;
isColumn?: boolean;
isJSON?: boolean;
id?: string;
}

export interface AttributeValuesMap {
Expand All @@ -77,7 +68,7 @@ interface ClientSideQBSearchProps {
className?: string;
suffixIcon?: React.ReactNode;
attributeValuesMap?: AttributeValuesMap;
attributeKeys: AttributeKey[];
attributeKeys: BaseAutocompleteData[];
}

interface AttributeValue {
Expand All @@ -86,12 +77,6 @@ interface AttributeValue {
boolAttributeValues: boolean[] | [];
}

function DropdownMenuRenderer(
menu: ReactElement<unknown, string | JSXElementConstructor<unknown>>,
): React.ReactElement {
return <ClientSideQBSearchDropdown menu={menu} />;
}

function ClientSideQBSearch(
props: ClientSideQBSearchProps,
): React.ReactElement {
Expand Down Expand Up @@ -630,7 +615,6 @@ function ClientSideQBSearch(
notFoundContent={null}
showAction={['focus']}
onBlur={handleOnBlur}
dropdownRender={DropdownMenuRenderer}
>
{dropdownOptions.map((option) => {
let val = option.value;
Expand Down

This file was deleted.

0 comments on commit 3b78d09

Please sign in to comment.