Browse Source

fix(AdvancedTable): Calculated column width could be larger than maxWidth

Owen Diffey 3 năm trước cách đây
mục cha
commit
d4cead012f
1 tập tin đã thay đổi với 6 bổ sung3 xóa
  1. 6 3
      frontend/src/components/AdvancedTable.vue

+ 6 - 3
frontend/src/components/AdvancedTable.vue

@@ -994,9 +994,12 @@ export default {
 					} else {
 						// eslint-disable-next-line no-param-reassign
 						orderedColumn.width = orderedColumn.calculatedWidth =
-							Math.max(
-								orderedColumn.minWidth || 100,
-								calculatedWidth
+							Math.min(
+								Math.max(
+									orderedColumn.minWidth || 100,
+									calculatedWidth
+								),
+								orderedColumn.maxWidth || 1000
 							);
 					}
 				}