BitDataGrid breaks a wrapped header in the middle of a word although the header fits its column
I maintainer di solito rispondono entro 1 giorno
@msynk ci sta già lavorando.
Dal 19/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the bug
With WrapCellText (or a column's WrapText), a header whose text would fit in its column on one line still breaks in the middle of a word. In a Persian grid this turns «انجامنشده» into «انجامنشد» / «ه», and «عقبافتاده» into «عقبافتا» / «ده»: the second line holds a single letter or two, which reads as a different (and broken) word.
It happens on a sortable column whose HeaderTemplate puts the title beside a small icon in a horizontal flex row (a common "title + hint" header), and the column is only a few pixels too narrow for title + icon + the hidden sort arrow.
Two things combine:
- The sort arrow takes space while it is invisible.
.bit-dtg-htext::after(content: "▲") isdisplay: block; position: static; opacity: 0while the column is unsorted, so it still occupies its width (8.6px here) plus the button'sgap(4px) on every sortable header. overflow-wrap: anywhereon wrapped headers (.bit-dtg-hcell-wrap .bit-dtg-htextinBitDataGrid.scss) lowers the content's min-content width to a single character, so when the flex row inside the header is short of space it shrinks the text below its own longest word instead of letting it keep its width.
Measured on one header (aria-sort absent, i.e. unsorted), column width 110px, padding-inline: 10px:
| header button | title + icon needed | title width | title lines | |
|---|---|---|---|---|
as shipped (anywhere, arrow in flow) |
89.2px | 82.5px | 52.6px | 2 (word broken) |
overflow-wrap: break-word |
89.2px | 82.5px | 58.5px | 1 |
anywhere, but ::after { display: none } |
89.2px | 82.5px | 58.5px | 1 |
So the title fits in its column with room to spare; it only breaks because 12.6px are kept for an arrow nobody sees, and anywhere lets the shortfall come out of the middle of a word.
Steps to reproduce
<BitDataGrid Items="items" WrapCellText>
<Columns>
<BitDataGridColumn Property="r => r.Count" Sortable Width="110px">
<HeaderTemplate>
<BitStack Horizontal Gap="0" VerticalAlign="BitAlignment.Center">
<span>انجامنشده</span>
<BitButton IconOnly Variant="BitVariant.Text" Size="BitSize.Small" IconName="@BitIconName.Info" />
</BitStack>
</HeaderTemplate>
</BitDataGridColumn>
</Columns>
</BitDataGrid>
Any text and icon work as long as title + icon is a little narrower than the header button but wider than the button minus the arrow and the gap.
Expected behavior
A header that fits its column on one line stays on one line, and when a header has to wrap it breaks between words, not inside one. Only a single word wider than the whole column should be broken.
Possible directions (whichever fits the component best):
- Keep the sort arrow out of the flow while the column is unsorted (e.g.
display: none/ zero width untilaria-sortis set, or position it absolutely), so it does not cost every sortable header its width. - Use
overflow-wrap: break-wordfor wrapped headers: it keeps words whole and only breaks a word that alone is wider than the line.anywheremakes sense for cell values (URLs, ids), but a header title is made of words.
Workaround
.bit-dtg .bit-dtg-hcell-wrap .bit-dtg-htext {
overflow-wrap: break-word;
}
Environment
- Bit.BlazorUI / Bit.BlazorUI.Extras
11.0.0-pre-10(the same rule is still ondevelopandbit11) - .NET 11 RC, Blazor Server and WebAssembly, RTL (
fa-IR) - Edge (Chromium)
- Lingua principale
- C#
- Stelle
- 1.4k
- Fork
- 264
- Merge medio
- 20h 36m
- PR unite (30g)
- 322
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bitfoundation/bitplatform
-
The test-platform skill doesn't say what three of its failures look likeForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
bitfoundation/bitplatform#14022 ·
I maintainer di solito rispondono entro 1 giorno
-
bit Boilerplate's realtime profile picture E2E tests wait for a request the hybrid apps never make in their WebViewForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
bitfoundation/bitplatform#14020 ·
I maintainer di solito rispondono entro 1 giorno
-
bit Boilerplate's E2E phone number tests fail when they pick a non-US +1 area codeForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
bitfoundation/bitplatform#14018 ·
I maintainer di solito rispondono entro 1 giorno
-
bit Boilerplate can't create a product when embeddings are onForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
bitfoundation/bitplatform#14016 ·
I maintainer di solito rispondono entro 1 giorno
-
bit Boilerplate's E2E tests sign in to the demos with the wrong seeded passwordForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
bitfoundation/bitplatform#14014 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di bitfoundation/bitplatform
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
KnifeLemon/Filee#363 ·
I maintainer di solito rispondono entro 1 giorno
-
[CI] .trgen-ignore required for several grammars.Forse già presa @kaby76 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
antlr/grammars-v4#5073 ·
I maintainer di solito rispondono entro 1 giorno
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeApertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nightscout/nocturne#2317 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderForse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
joinrpg/joinrpg-net#5752 ·
I maintainer di solito rispondono entro 1 giorno