fix(participants-pane) fixed participants pane button toggled state
This commit is contained in:
parent
186125607f
commit
cf49af1a9f
|
@ -10,6 +10,11 @@ import { AbstractButton, type AbstractButtonProps } from '../../base/toolbox/com
|
||||||
*/
|
*/
|
||||||
type Props = AbstractButtonProps & {
|
type Props = AbstractButtonProps & {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the participants pane is open.
|
||||||
|
*/
|
||||||
|
_isOpen: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* External handler for click action.
|
* External handler for click action.
|
||||||
*/
|
*/
|
||||||
|
@ -34,6 +39,31 @@ class ParticipantsPaneButton extends AbstractButton<Props, *> {
|
||||||
_handleClick() {
|
_handleClick() {
|
||||||
this.props.handleClick();
|
this.props.handleClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether this button is in toggled state or not.
|
||||||
|
*
|
||||||
|
* @override
|
||||||
|
* @protected
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
_isToggled() {
|
||||||
|
return this.props._isOpen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translate(connect()(ParticipantsPaneButton));
|
/**
|
||||||
|
* Maps part of the Redux state to the props of this component.
|
||||||
|
*
|
||||||
|
* @param {Object} state - The Redux state.
|
||||||
|
* @returns {Props}
|
||||||
|
*/
|
||||||
|
function mapStateToProps(state) {
|
||||||
|
const { isOpen } = state['features/participants-pane'];
|
||||||
|
|
||||||
|
return {
|
||||||
|
_isOpen: isOpen
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translate(connect(mapStateToProps)(ParticipantsPaneButton));
|
||||||
|
|
Loading…
Reference in New Issue