Skip to content

Combobox extending Dropdown #1416

Open
Open
@Licen-it

Description

@Licen-it

Detailed description

Describe in detail the issue you're having.

I noticed the implementation of Combobox is very different from the Dropdown one, even though the behaviours are very very similar. I was then thinking to propose a refactor that would make the code more reusable and that would keep the 2 components in sync once one gets updated.
I was thinking that the only extra thing Combobox have compared to Dropdown is the ability to search within the items list. Then what about having Combobox extending Dropdown and keeping there only the search callbacks? Even the template could be removed adding in Dropdown the input required for the search, but only visible if a protected variable is true...and as protected only Combobox extending Dropdown would be able to override it. In the same way the specific classes could be assigned to protected variables so that Combobox could override them.
(I know protected variables won't build if used in the template, but there are workarounds to have them working like assigning at construction time to a public variable)

Is this a feature request (new component, new icon), a bug, or a general issue?

proposal

Is this issue related to a specific component?

Combobox

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions