Slider knob does not update onValue Changed

Why this does not work?

            public void MyToggleChanged(bool isOn)
            {
                MyIntensitySlider.interactable = isOn;
                MyDirectionDropdown.interactable = isOn;
                Debug.Log("bool value changed: " + (isOn));
            }

Ok I solved it but still not sure why I have to do this…I have added an update function like this and I have call it in Update

private void UpdateMySlidersDropdown()
        {

                if (ToggleCheckBox.isOn == true)
                {
                    MyIntensitySlider.interactable = true;
                    MyDirectionDropdown.interactable = true;
                    Debug.Log("bool value changed: " + (MyIntensitySlider.interactable));
                }
                else if (ToggleCheckBox.isOn == false)
                {
                    MyIntensitySlider.interactable = false;
                    MyDirectionDropdown.interactable = false;
                    Debug.Log("bool value changed: " + (MyIntensitySlider.interactable));
                }
            
        }