Skip to content

light theme difference between dropdown and combobox #2150

Open
@huineng

Description

@huineng

v 4.59.1 current release

there's a different implementation for theme light between dropdown and combobox
Is it possible to align them so that combobox has the same implementation

https://github.com/IBM/carbon-components-angular/blob/53c31d3a92af2fd5e45fa107ebdb23d7ec99c069/src/dropdown/dropdown.component.ts#L678
https://github.com/IBM/carbon-components-angular/blob/53c31d3a92af2fd5e45fa107ebdb23d7ec99c069/src/combobox/combobox.component.ts#L812

dropdown

_appendToBody() {
		const lightClass = this.theme === "light" ? " bx--list-box--light" : "";
		const expandedClass = !this.menuIsClosed ? " bx--list-box--expanded" : "";
		this.dropdownService.appendToBody(
			this.dropdownButton.nativeElement,
			this.dropdownMenu.nativeElement,
			`${this.elementRef.nativeElement.className}${lightClass}${expandedClass}`);
		this.dropdownMenu.nativeElement.addEventListener("keydown", this.keyboardNav, true);
	}

combobox missing implementation

 const lightClass = this.theme === "light" ? " bx--list-box--light" : "";
	_appendToBody() {
		this.dropdownService.appendToBody(
			this.listbox.nativeElement,
			this.dropdownMenu.nativeElement,
			`${this.elementRef.nativeElement.className}${this.open ? " bx--list-box--expanded" : ""}`);
		this.dropdownMenu.nativeElement.addEventListener("keydown", this.keyboardNav, true);
	}

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions