We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83d7a6d commit c0255a5Copy full SHA for c0255a5
3 files changed
src/components/avatar/__snapshots__/avatar.test.tsx.snap
@@ -179,7 +179,7 @@ exports[`EuiAvatar props initials is rendered 1`] = `
179
<span
180
aria-hidden="true"
181
>
182
- l
+ lo
183
</span>
184
</div>
185
`;
src/services/string/to_initials.ts
@@ -29,7 +29,7 @@ export function toInitials(
29
): string | null {
30
// Calculate the number of initials to show, maxing out at MAX_INITIALS
31
let calculatedInitialsLength: number = initials
32
- ? initials.split(' ').length
+ ? initials.split('').length
33
: name.split(' ').length;
34
35
calculatedInitialsLength =
upcoming_changelogs/6346.md
@@ -0,0 +1,3 @@
1
+**Bug fixes**
2
+
3
+- Fixed bug in `to_initials` that truncates custom initials
0 commit comments