diff --git a/vuu-ui/packages/vuu-data-react/src/data-editing/get-data-item-edit-control.tsx b/vuu-ui/packages/vuu-data-react/src/data-editing/get-data-item-edit-control.tsx index ad88d48d4..5bc45eadc 100644 --- a/vuu-ui/packages/vuu-data-react/src/data-editing/get-data-item-edit-control.tsx +++ b/vuu-ui/packages/vuu-data-react/src/data-editing/get-data-item-edit-control.tsx @@ -1,6 +1,5 @@ -import { +import type { DataValueDescriptor, - SuggestionProvider, TableSchemaTable, } from "@finos/vuu-data-types"; import { diff --git a/vuu-ui/packages/vuu-filters/src/inline-filter/InlineFilter.tsx b/vuu-ui/packages/vuu-filters/src/inline-filter/InlineFilter.tsx index d986ab512..3cc2f6585 100644 --- a/vuu-ui/packages/vuu-filters/src/inline-filter/InlineFilter.tsx +++ b/vuu-ui/packages/vuu-filters/src/inline-filter/InlineFilter.tsx @@ -8,6 +8,7 @@ import { ColumnDescriptor } from "@finos/vuu-table-types"; import inlineFilteCss from "./InlineFilter.css"; import { InputProps } from "@salt-ds/core"; +import { TableSchemaTable } from "@finos/vuu-data-types"; const classBase = "vuuInlineFilter"; @@ -18,6 +19,7 @@ export type FilterValueChangeHandler = ( export interface InlineFilterProps extends Omit, "onChange"> { onChange: FilterValueChangeHandler; + table: TableSchemaTable; } const InputProps: Partial = { @@ -27,6 +29,7 @@ const InputProps: Partial = { export const InlineFilter = ({ onChange, + table, ...htmlAttributes }: InlineFilterProps) => { const targetWindow = useWindow(); @@ -64,6 +67,7 @@ export const InlineFilter = ({ InputProps, dataDescriptor: column, onCommit, + table, })} ))} diff --git a/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/VuuTypeaheadInput.tsx b/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/VuuTypeaheadInput.tsx index d86bb6468..4df98e4b0 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/VuuTypeaheadInput.tsx +++ b/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/VuuTypeaheadInput.tsx @@ -2,13 +2,13 @@ import type { SuggestionProvider, TableSchemaTable, } from "@finos/vuu-data-types"; +import type { CommitHandler } from "@finos/vuu-utils"; import { ComboBox, Option } from "@salt-ds/core"; -import { useVuuTypeaheadInput } from "./useVuuTypeaheadInput"; import { useComponentCssInjection } from "@salt-ds/styles"; import { useWindow } from "@salt-ds/window"; +import { useVuuTypeaheadInput } from "./useVuuTypeaheadInput"; import vuuTypeaheadInputCss from "./VuuTypeaheadInput.css"; -import { CommitHandler } from "@finos/vuu-utils"; const classBase = "vuuTypeaheadInput"; @@ -22,7 +22,6 @@ export interface VuuTypeaheadInputProps { export const VuuTypeaheadInput = ({ column, onCommit, - suggestionProvider, table, }: VuuTypeaheadInputProps) => { const targetWindow = useWindow(); @@ -43,7 +42,6 @@ export const VuuTypeaheadInput = ({ } = useVuuTypeaheadInput({ column, onCommit, - suggestionProvider, table, }); return ( diff --git a/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/useVuuTypeaheadInput.ts b/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/useVuuTypeaheadInput.ts index 31b69ff3b..2f494bd9e 100644 --- a/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/useVuuTypeaheadInput.ts +++ b/vuu-ui/packages/vuu-ui-controls/src/vuu-typeahead-input/useVuuTypeaheadInput.ts @@ -1,17 +1,17 @@ -import { TypeaheadParams } from "@finos/vuu-protocol-types"; +import { useTypeaheadSuggestions } from "@finos/vuu-data-react"; +import type { TypeaheadParams } from "@finos/vuu-protocol-types"; import { dispatchKeyboardEvent, getVuuTable } from "@finos/vuu-utils"; import { - ChangeEventHandler, ComponentPropsWithoutRef, - RefCallback, - SyntheticEvent, useCallback, useEffect, useRef, useState, + type ChangeEventHandler, + type RefCallback, + type SyntheticEvent, } from "react"; -import { VuuTypeaheadInputProps } from "./VuuTypeaheadInput"; -import { useTypeaheadSuggestions } from "@finos/vuu-data-react"; +import type { VuuTypeaheadInputProps } from "./VuuTypeaheadInput"; const NO_DATA_MATCH = ["No matching data"]; diff --git a/vuu-ui/showcase/src/examples/Filters/InlineFilter/InlineFilter.examples.tsx b/vuu-ui/showcase/src/examples/Filters/InlineFilter/InlineFilter.examples.tsx index 762c6a2e1..8686f25af 100644 --- a/vuu-ui/showcase/src/examples/Filters/InlineFilter/InlineFilter.examples.tsx +++ b/vuu-ui/showcase/src/examples/Filters/InlineFilter/InlineFilter.examples.tsx @@ -1,23 +1,28 @@ import { useMemo } from "react"; import { FilterValueChangeHandler, InlineFilter } from "@finos/vuu-filters"; import { SimulTable } from "../../Table/SIMUL.examples"; +import { LocalDataSourceProvider } from "@finos/vuu-data-test"; let displaySequence = 0; +const table = { module: "SIMUL", table: "instrumentsExtended" } as const; + export const SimpleInlineFilters = () => { const inlineFilter = useMemo(() => { const onChange: FilterValueChangeHandler = (column, value) => { console.log(`apply filter to column ${column.name} using value ${value}`); }; - return ; + return ; }, []); return ( - + + + ); }; SimpleInlineFilters.displaySequence = displaySequence++;