Skip to content

feat(DATAUI-3610): add suggest#2596

Open
getDimaMal wants to merge 13 commits intogravity-ui:mainfrom
getDimaMal:feat/DATAUI-3610_add-suggest
Open

feat(DATAUI-3610): add suggest#2596
getDimaMal wants to merge 13 commits intogravity-ui:mainfrom
getDimaMal:feat/DATAUI-3610_add-suggest

Conversation

@getDimaMal
Copy link
Contributor

No description provided.

@gravity-ui
Copy link
Contributor

gravity-ui bot commented Feb 26, 2026

Preview is ready.

@gravity-ui
Copy link
Contributor

gravity-ui bot commented Feb 26, 2026

🎭 Component Tests Report is ready.

@getDimaMal getDimaMal force-pushed the feat/DATAUI-3610_add-suggest branch 5 times, most recently from ca4d0eb to 869d946 Compare February 27, 2026 12:32
@getDimaMal getDimaMal requested a review from ogonkov as a code owner March 2, 2026 11:41
@getDimaMal getDimaMal force-pushed the feat/DATAUI-3610_add-suggest branch from 313deb2 to 190b2ee Compare March 2, 2026 11:42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess input should have clear button?

import {Flex} from '../layout';

export type SuggestProps<T> = TextInputProps & {
items?: ListItemData<T>[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect Suggest being almost identical to Select in almost every aspect except for the trigger (which is TextInput in this case) and the lack of filter in Popup

So the property should be called options and other props should be copied as is as well (with some exceptions)

I would expect the same visuals and behaviors as well

@amje what do you think?

There's also an inline mode in common's Suggest. Do you plan do add it as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ruminat Which props do you want to copy? I agree with the naming of items

Copy link
Contributor

@Ruminat Ruminat Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@korvin89 These, I guess:

// at least these props, I guess
Pick<SelectProps,
    | "onUpdate"
    | "renderOption"
    | "renderOptionGroup"
    | "renderEmptyOptions"
    | "renderPopup"
    | "renderCounter"
    | "getOptionHeight"
    | "getOptionGroupHeight"
    | "value"
    | "defaultValue"
    | "options"
    | "error"
    | "errorMessage"
    | "errorPlacement"
    | "validationState"
    | "multiple"
    | "filter"
    | "onFilterChange"
    | "disablePortal"
    | "loading"
    | "onLoadMore"
    | "id"
    | "hasCounter"
    | "renderCounter"
    | "disabled"
>

// Would like to see these ones as well
type NiceToHaveProps = {
    readonly?: boolean;
    inline?: boolean;
};

@getDimaMal getDimaMal force-pushed the feat/DATAUI-3610_add-suggest branch from eba7320 to 6e9ebd7 Compare March 10, 2026 08:33
@getDimaMal getDimaMal force-pushed the feat/DATAUI-3610_add-suggest branch from eaae402 to 79cba7f Compare March 10, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants