@huaqiu/dsh-sidebar-entry 0.6.13 → 0.6.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.mjs CHANGED
@@ -34,6 +34,7 @@ function createEntry(options) {
34
34
  if (count <= 0) {
35
35
  badgeSpan?.remove();
36
36
  badgeSpan = null;
37
+ entry.removeAttribute("data-has-badge");
37
38
  return;
38
39
  }
39
40
  if (badgeSpan === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huaqiu/dsh-sidebar-entry",
3
- "version": "0.6.13",
3
+ "version": "0.6.16",
4
4
  "type": "module",
5
5
  "main": "./lib/index.mjs",
6
6
  "types": "./lib/index.d.mts",
package/src/index.ts CHANGED
@@ -122,6 +122,9 @@ function createEntry(options: SidebarEntryOptions): {
122
122
  if (count <= 0) {
123
123
  badgeSpan?.remove()
124
124
  badgeSpan = null
125
+ // The attribute drives badge styling / collapsed-rail layout. Leaving it
126
+ // behind at count 0 kept the row looking badged with no badge in it.
127
+ entry.removeAttribute('data-has-badge')
125
128
  return
126
129
  }
127
130
  if (badgeSpan === null) {