It feels weird that the "hideClearButton" has a condition inside it. This method should hide it - as  the name indicates.
I would much rather have a new method, maybe "toggle" or even something like "setAccordingToValue".
I want to be able to "rely" on the "hide" method to actually hide the button.