Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elements using textContent don't trim whitesapce #330

Closed
Pupix opened this issue Jul 8, 2024 · 1 comment
Closed

Elements using textContent don't trim whitesapce #330

Pupix opened this issue Jul 8, 2024 · 1 comment

Comments

@Pupix
Copy link

Pupix commented Jul 8, 2024

Hello,

When using <mdui-select> the text value of the items doesn't get trimmed so you end up with something like this:

image

when writing

<mdui-menu-item value="SCHEDULED">
    Scheduled
</mdui-menu-item>

The issue is here

this.menuItems.find((item) => item.value === valueItem)?.textContent ||

and this one could be an issue for some other component

text += node.textContent;

textContent should be replaced with textContent?.trim() I suppose.

There's probably more but can't find them right now.

zdhxiong added a commit that referenced this issue Jul 13, 2024
zdhxiong added a commit that referenced this issue Jul 15, 2024
@zdhxiong
Copy link
Owner

Fixed in v2.1.2

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

No branches or pull requests

2 participants