jayeshchoudhary commented on code in PR #15511: URL: https://github.com/apache/pinot/pull/15511#discussion_r2036909485
########## pinot-controller/src/main/resources/app/components/Homepage/Operations/RebalanceServer/RebalanceServerConfigurationOptions/RebalanceServerConfigurationOptionToggleSwitch.tsx: ########## @@ -26,10 +26,13 @@ import { type RebalanceServerConfigurationOptionSwitchProps = { option: RebalanceServerOption; handleConfigChange: (config: { [key: string]: string | number | boolean }) => void; + rebalanceConfig: { [optionName: string]: string | boolean | number }; } export const RebalanceServerConfigurationOptionSwitch = ( - { option, handleConfigChange }: RebalanceServerConfigurationOptionSwitchProps) => { - const [isChecked, setIsChecked] = useState<boolean>(option.defaultValue as boolean); + { option, handleConfigChange, rebalanceConfig }: RebalanceServerConfigurationOptionSwitchProps) => { + const [isChecked, setIsChecked] = useState<boolean>( + (Object.keys(rebalanceConfig).includes(option.name) ? rebalanceConfig[option.name] : option.defaultValue) as boolean + ); Review Comment: what are these changes for? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org