add onComponentChanged method