We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 535b490 commit 7bd1651Copy full SHA for 7bd1651
packages/pluggableWidgets/datagrid-web/src/model/stores/GridSize.store.ts
@@ -60,9 +60,10 @@ export class GridSizeStore {
60
61
get templateColumnsHead(): string | undefined {
62
return this.columnSizes
63
- ?.map(s => {
64
- const str = s.toString();
65
- return `${str.slice(0, str.indexOf(".") + 4)}px`;
+ ?.map(size => {
+ const str = size.toString();
+ const dotIndex = str.indexOf(".");
66
+ return `${dotIndex === -1 ? str : str.slice(0, dotIndex + 4)}px`;
67
})
68
.join(" ");
69
}
0 commit comments