From 738895c6077dbe821126a947d427316348e9b411 Mon Sep 17 00:00:00 2001 From: olzzon Date: Wed, 12 Jun 2019 12:50:55 +0200 Subject: [PATCH] fix: re-render grp fader chore: channel shouldcomponentupdate no assignment of variables --- src/components/Channel.tsx | 12 +----------- src/components/GrpFader.tsx | 12 ++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/Channel.tsx b/src/components/Channel.tsx index 6a60104f..2db837ad 100644 --- a/src/components/Channel.tsx +++ b/src/components/Channel.tsx @@ -16,7 +16,6 @@ interface IChannelInjectProps { pflOn: boolean, showChannel: boolean, faderLevel: number, - outputLevel: number, label: string, snapOn: boolean[], mixerProtocol: string, @@ -40,21 +39,16 @@ class Channel extends React.Component {this.props.label != "" ? this.props.label : ("CH " + (this.channelIndex + 1)) } -
- GAIN: {Math.round(this.props.outputLevel * 100) / 100} -
{this.props.snapOn .map((none: any, index: number) => { @@ -229,7 +220,6 @@ const mapStateToProps = (state: any, props: any): IChannelInjectProps => { pflOn: state.channels[0].channel[props.channelIndex].pflOn, showChannel: state.channels[0].channel[props.channelIndex].showChannel, faderLevel: state.channels[0].channel[props.channelIndex].faderLevel, - outputLevel: state.channels[0].channel[props.channelIndex].outputLevel, label: state.channels[0].channel[props.channelIndex].label, snapOn: state.channels[0].channel[props.channelIndex].snapOn.map((item: number) => {return item}), mixerProtocol: state.settings[0].mixerProtocol, diff --git a/src/components/GrpFader.tsx b/src/components/GrpFader.tsx index 5f27cfa1..ec6a9821 100644 --- a/src/components/GrpFader.tsx +++ b/src/components/GrpFader.tsx @@ -36,6 +36,18 @@ class GrpFader extends PureComponent