Skip to content

Commit 54cf4db

Browse files
fix styles for sortable column header
1 parent 951b904 commit 54cf4db

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/column/tableColumnComp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const columnChildrenMap = {
106106
borderWidth: withDefault(RadiusControl, ""),
107107
radius: withDefault(RadiusControl, ""),
108108
textSize: withDefault(RadiusControl, ""),
109-
textWeight: withDefault(StringControl, "regular"),
109+
textWeight: withDefault(StringControl, "normal"),
110110
fontFamily: withDefault(StringControl, "sans-serif"),
111111
cellColor: CellColorComp,
112112
textOverflow: withDefault(TextOverflowControl, "ellipsis"),
@@ -276,7 +276,7 @@ export class ColumnComp extends ColumnInitComp {
276276
{this.children.textWeight.propertyView({
277277
label: trans('style.textWeight'),
278278
preInputNode: <StyledTextWeightIcon as={TextWeigthIcon} title="" />,
279-
placeholder: 'regular',
279+
placeholder: 'normal',
280280
})}
281281
{this.children.fontFamily.propertyView({
282282
label: trans('style.fontFamily'),

client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ const TableWrapper = styled.div<{
212212
border-color: ${(props) => props.$headerStyle.border};
213213
border-width: ${(props) => props.$headerStyle.borderWidth};
214214
color: ${(props) => props.$headerStyle.headerText};
215-
font-size: ${(props) => props.$headerStyle.textSize};
216-
font-weight: ${(props) => props.$headerStyle.textWeight};
217-
font-family: ${(props) => props.$headerStyle.fontFamily};
218215
border-inline-end: ${(props) => `${props.$headerStyle.borderWidth} solid ${props.$headerStyle.border}`} !important;
219216
${(props) =>
220217
props.$fixedHeader && `
@@ -227,6 +224,12 @@ const TableWrapper = styled.div<{
227224
228225
> div {
229226
margin: ${(props) => props.$headerStyle.margin};
227+
228+
&, .ant-table-column-title > div {
229+
font-size: ${(props) => props.$headerStyle.textSize};
230+
font-weight: ${(props) => props.$headerStyle.textWeight};
231+
font-family: ${(props) => props.$headerStyle.fontFamily};
232+
}
230233
}
231234
232235
&:last-child {
@@ -516,7 +519,7 @@ function TableCellView(props: {
516519
const cellColor = cellColorFn({
517520
currentCell: record[title.toLowerCase()],
518521
});
519-
522+
520523
const style = {
521524
background: cellColor || rowColor || columnStyle.background || columnsStyle.background,
522525
margin: columnStyle.margin || columnsStyle.margin,

client/packages/lowcoder/src/comps/controls/styleControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ function calcColors<ColorMap extends Record<string, string>>(
393393
}
394394
if (isTextWeightConfig(config)) {
395395
// TODO: remove default textWeight after added in theme in backend.
396-
res[name] = themeWithDefault[config.textWeight] || 'regular';
396+
res[name] = themeWithDefault[config.textWeight] || 'normal';
397397
}
398398
if (isFontFamilyConfig(config)) {
399399
res[name] = themeWithDefault[config.fontFamily] || 'sans-serif';

0 commit comments

Comments
 (0)