@@ -22,6 +22,7 @@ import {
2222 BoolCodeControl ,
2323 jsonControl ,
2424 jsonValueExposingStateControl ,
25+ useMergeCompStyles ,
2526} from "lowcoder-sdk" ;
2627import { i18nObjs , trans } from "./i18n/comps" ;
2728
@@ -485,7 +486,7 @@ function toSelf(color: string) {
485486
486487let GanttChartCompBase = ( function ( ) {
487488 const childrenMap = {
488- styles : styleControl ( CompStyles ) ,
489+ styles : styleControl ( CompStyles , 'styles' ) ,
489490 autoHeight : withDefault ( AutoHeightControl , "auto" ) ,
490491 showHeaders : withDefault ( BoolControl , true ) ,
491492 showLegendTable : withDefault ( BoolControl , true ) ,
@@ -494,7 +495,7 @@ let GanttChartCompBase = (function () {
494495 legendHeaderStyle : styleControl ( TaskListHeaderStyle ) ,
495496 legendStyle : styleControl ( TaskListTableStyle ) ,
496497 tooltipStyle : styleControl ( TooltipStyle ) ,
497- ganttChartStyle : styleControl ( CompStyles ) ,
498+ ganttChartStyle : styleControl ( CompStyles , 'ganttChartStyle' ) ,
498499 activeViewMode : dropdownControl ( viewModeOptions , ViewMode . Day ) ,
499500 legendWidth : withDefault ( StringControl , "300px" ) ,
500501 headerHeight : withDefault ( NumberControl , 30 ) ,
@@ -539,6 +540,8 @@ let GanttChartCompBase = (function () {
539540 const [ dimensions , setDimensions ] = useState ( { width : 480 , height : 300 } ) ;
540541 const [ updatedGanttTasks , setUpdatedGanttTasks ] = useState < Task [ ] > ( [ ] ) ;
541542
543+ useMergeCompStyles ( props as Record < string , any > , dispatch ) ;
544+
542545 const { width, height, ref : conRef } = useResizeDetector ( {
543546 onResize : ( ) => {
544547 const container = conRef . current ;
0 commit comments