mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 03:55:51 +01:00
clarify variable naming
This commit is contained in:
@@ -21,10 +21,10 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
import React, {ChangeEvent, FormEvent} from "react";
|
||||
import {WithTranslation, withTranslation} from "react-i18next";
|
||||
import React, { ChangeEvent, FormEvent } from "react";
|
||||
import { WithTranslation, withTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import {createAttributesForTesting} from "../devBuild";
|
||||
import { createAttributesForTesting } from "../devBuild";
|
||||
|
||||
type Props = WithTranslation & {
|
||||
filter: (p: string) => void;
|
||||
@@ -59,12 +59,12 @@ class FilterInput extends React.Component<Props, State> {
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
componentDidUpdate = (prevProps: Props) => {
|
||||
const { value } = this.props;
|
||||
componentDidUpdate = ({ value: oldValue }: Props) => {
|
||||
const { value: newValue } = this.props;
|
||||
const { value: stateValue } = this.state;
|
||||
if (prevProps.value !== value && value !== stateValue) {
|
||||
if (oldValue !== newValue && newValue !== stateValue) {
|
||||
this.setState({
|
||||
value: value || ""
|
||||
value: newValue || ""
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user