Skip to content

deselect hover indication should not appear when deselectable is false #564

Open
@nielslyngsoe

Description

@nielslyngsoe

Which exact UI Library version are you using? For example: 1.0.1 - don't just write v1.

1.4.0-rc.1

Bug summary

When extending the uui-card element and setting selectable to true, but deselectable to false. I still see the indication on the border that a click will deselect the item. though it does not. We need to not have that CSS hover effect when deselectable is set to false.

image

Specifics

No response

Steps to reproduce

make a element that extends uui-card. like this:

`
@CustomElement('my-credit-card')
export class UmbCreditCardElement extends UUICardElement {

@property()
value?: string;

@property()
public get name(): string | undefined {
	return this._name;
}
public set name(name: string | undefined) {
	this._name = name;
	this.setAttribute('aria-label', name ?? '');
}
private _name?: string | undefined;

constructor() {
	super();
	this.selectable = true;
	this.deselectable = false;
	this.requestUpdate('selectable'); //temporary fix, cause by another issue fix in a PR.
}

public render() {
return html`<h5>${this.name}</h5>`;

}

static styles = [
	...UUICardElement.styles,
	css`
		:host {
			max-width: 240px;
		}
	`
];

}`

Expected result / actual result

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcommunity/up-for-grabsneeds triageThis issue has not been tested by a team member yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions