@@ -165,7 +165,7 @@ func (b *ConfigBuilder) WithFooterMaxWidth(maxWidth int) *ConfigBuilder {
165
165
if maxWidth < 0 {
166
166
return b
167
167
}
168
- b .config .Footer .Formatting . MaxWidth = maxWidth
168
+ b .config .Footer .ColMaxWidths . Global = maxWidth
169
169
return b
170
170
}
171
171
@@ -217,7 +217,7 @@ func (b *ConfigBuilder) WithHeaderMaxWidth(maxWidth int) *ConfigBuilder {
217
217
if maxWidth < 0 {
218
218
return b
219
219
}
220
- b .config .Header .Formatting . MaxWidth = maxWidth
220
+ b .config .Header .ColMaxWidths . Global = maxWidth
221
221
return b
222
222
}
223
223
@@ -280,7 +280,7 @@ func (b *ConfigBuilder) WithRowMaxWidth(maxWidth int) *ConfigBuilder {
280
280
if maxWidth < 0 {
281
281
return b
282
282
}
283
- b .config .Row .Formatting . MaxWidth = maxWidth
283
+ b .config .Row .ColMaxWidths . Global = maxWidth
284
284
return b
285
285
}
286
286
@@ -371,13 +371,13 @@ func (ff *FooterFormattingBuilder) WithAutoWrap(autoWrap int) *FooterFormattingB
371
371
372
372
// WithMaxWidth sets the maximum content width for footer cells.
373
373
// Negative values are ignored.
374
- func (ff * FooterFormattingBuilder ) WithMaxWidth (maxWidth int ) * FooterFormattingBuilder {
375
- if maxWidth < 0 {
376
- return ff
377
- }
378
- ff .config .MaxWidth = maxWidth
379
- return ff
380
- }
374
+ // func (ff *FooterFormattingBuilder) WithMaxWidth(maxWidth int) *FooterFormattingBuilder {
375
+ // if maxWidth < 0 {
376
+ // return ff
377
+ // }
378
+ // ff.config.Foo = maxWidth
379
+ // return ff
380
+ // }
381
381
382
382
// WithNewarkMode sets the merge behavior for footer cells (likely a typo, should be WithMergeMode).
383
383
// Invalid merge modes are ignored.
@@ -489,13 +489,13 @@ func (hf *HeaderFormattingBuilder) WithAutoWrap(autoWrap int) *HeaderFormattingB
489
489
490
490
// WithMaxWidth sets the maximum content width for header cells.
491
491
// Negative values are ignored.
492
- func (hf * HeaderFormattingBuilder ) WithMaxWidth (maxWidth int ) * HeaderFormattingBuilder {
493
- if maxWidth < 0 {
494
- return hf
495
- }
496
- hf .config .MaxWidth = maxWidth
497
- return hf
498
- }
492
+ // func (hf *HeaderFormattingBuilder) WithMaxWidth(maxWidth int) *HeaderFormattingBuilder {
493
+ // if maxWidth < 0 {
494
+ // return hf
495
+ // }
496
+ // hf.config.MaxWidth = maxWidth
497
+ // return hf
498
+ // }
499
499
500
500
// WithMergeMode sets the merge behavior for header cells.
501
501
// Invalid merge modes are ignored.
@@ -610,13 +610,13 @@ func (rf *RowFormattingBuilder) WithAutoWrap(autoWrap int) *RowFormattingBuilder
610
610
611
611
// WithMaxWidth sets the maximum content width for row cells.
612
612
// Negative values are ignored.
613
- func (rf * RowFormattingBuilder ) WithMaxWidth (maxWidth int ) * RowFormattingBuilder {
614
- if maxWidth < 0 {
615
- return rf
616
- }
617
- rf .config .MaxWidth = maxWidth
618
- return rf
619
- }
613
+ // func (rf *RowFormattingBuilder) WithMaxWidth(maxWidth int) *RowFormattingBuilder {
614
+ // if maxWidth < 0 {
615
+ // return rf
616
+ // }
617
+ // rf.config.MaxWidth = maxWidth
618
+ // return rf
619
+ // }
620
620
621
621
// WithMergeMode sets the merge behavior for row cells.
622
622
// Invalid merge modes are ignored.
@@ -867,7 +867,7 @@ func WithRowMaxWidth(maxWidth int) Option {
867
867
if maxWidth < 0 {
868
868
return
869
869
}
870
- target .config .Row .Formatting . MaxWidth = maxWidth
870
+ target .config .Row .ColMaxWidths . Global = maxWidth
871
871
if target .logger != nil {
872
872
target .logger .Debug ("Option: WithRowMaxWidth applied to Table: %v" , maxWidth )
873
873
}
@@ -945,7 +945,6 @@ func defaultConfig() Config {
945
945
MaxWidth : 0 ,
946
946
Header : tw.CellConfig {
947
947
Formatting : tw.CellFormatting {
948
- MaxWidth : 0 ,
949
948
AutoWrap : tw .WrapTruncate ,
950
949
Alignment : tw .AlignCenter ,
951
950
AutoFormat : true ,
@@ -957,7 +956,6 @@ func defaultConfig() Config {
957
956
},
958
957
Row : tw.CellConfig {
959
958
Formatting : tw.CellFormatting {
960
- MaxWidth : 0 ,
961
959
AutoWrap : tw .WrapNormal ,
962
960
Alignment : tw .AlignLeft ,
963
961
AutoFormat : false ,
@@ -969,7 +967,6 @@ func defaultConfig() Config {
969
967
},
970
968
Footer : tw.CellConfig {
971
969
Formatting : tw.CellFormatting {
972
- MaxWidth : 0 ,
973
970
AutoWrap : tw .WrapNormal ,
974
971
Alignment : tw .AlignRight ,
975
972
AutoFormat : false ,
@@ -997,8 +994,8 @@ func mergeCellConfig(dst, src tw.CellConfig) tw.CellConfig {
997
994
if src .Formatting .AutoWrap != 0 {
998
995
dst .Formatting .AutoWrap = src .Formatting .AutoWrap
999
996
}
1000
- if src .Formatting . MaxWidth != 0 {
1001
- dst .Formatting . MaxWidth = src .Formatting . MaxWidth
997
+ if src .ColMaxWidths . Global != 0 {
998
+ dst .ColMaxWidths . Global = src .ColMaxWidths . Global
1002
999
}
1003
1000
if src .Formatting .MergeMode != 0 {
1004
1001
dst .Formatting .MergeMode = src .Formatting .MergeMode
0 commit comments