How to use the @microsoft/sp-lodash-subset.isEqual function in @microsoft/sp-lodash-subset

To help you get started, we’ve selected a few @microsoft/sp-lodash-subset examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SharePoint / sp-dev-fx-controls-react / src / controls / taxonomyPicker / TaxonomyPicker.tsx View on Github external
public componentDidUpdate(prevProps: ITaxonomyPickerProps): void {
    // Check if the initial values objects are not equal, if that is the case, data can be refreshed
    if (!isEqual(this.props.initialValues, prevProps.initialValues)) {
      this.setState({
        activeNodes: this.props.initialValues || []
      });
    }
  }
github SharePoint / sp-dev-fx-property-controls / src / propertyFields / order / PropertyFieldOrderHost.tsx View on Github external
public componentWillUpdate(nextProps: IPropertyFieldOrderHostProps): void {
    // Check if the provided items are still the same
    if (!isEqual(nextProps.items, this.state.items)) {
      this.setState({
        items: this.props.items || []
      });
    }
  }
github Puzzlepart / spfx-solutions / Pzl.Part.QuickLinks / src / webparts / allLinks / components / AllLinks.tsx View on Github external
userFavoriteLinks.forEach(userLink => {
      let linkMatch = find(allFavoriteLinks, (favoriteLink => favoriteLink.id === userLink.id));
      if (linkMatch && (!isEqual(linkMatch.url, userLink.url) || !isEqual(linkMatch.displayText, userLink.displayText) || !isEqual(linkMatch.icon, userLink.icon))) {
        shouldUpdate = true;
        personalLinks.push(linkMatch);
      } else {
        personalLinks.push(userLink);
      }
    });
github Puzzlepart / spfx-solutions / Pzl.Part.QuickLinks / src / webparts / quickLinks / components / QuickLinks.tsx View on Github external
userFavoriteLinks.forEach(userLink => {
            let linkMatch = find(allFavoriteLinks, (favoriteLink => favoriteLink.id === userLink.id));
            if (linkMatch && (!isEqual(linkMatch.url, userLink.url) || !isEqual(linkMatch.displayText, userLink.displayText) || !isEqual(linkMatch.icon, userLink.icon))) {
                shouldUpdate = true;
                personalLinks.push(linkMatch);
            } else {
                personalLinks.push(userLink);
            }
        });
        if (shouldUpdate) {
github SharePoint / sp-dev-fx-controls-react / src / controls / peoplepicker / PeoplePickerComponent.tsx View on Github external
public componentWillUpdate(nextProps: IPeoplePickerProps, nextState: IPeoplePickerState): void {
    if (!isEqual(this.props.defaultSelectedUsers, nextProps.defaultSelectedUsers) ||
        this.props.groupName !== nextProps.groupName ||
        this.props.webAbsoluteUrl !== nextProps.webAbsoluteUrl ||
        this.peopleSearchService.getSumOfPrincipalTypes(this.props.principalTypes) !== this.peopleSearchService.getSumOfPrincipalTypes(nextProps.principalTypes)) {
      this.getInitialPersons(nextProps);
    }
  }
github SharePoint / sp-dev-fx-controls-react / src / controls / dateTimePicker / DateTimePicker.tsx View on Github external
public componentWillReceiveProps(nextProps: IDateTimePickerProps): void {
    if (nextProps.value != null && !isEqual(nextProps.value, this.props.value)) {
      const { day, hours, minutes, seconds } = DateTimePicker.getDateComponents(nextProps.value, this.props.dateConvention);
      this.setState({ day, hours, minutes, seconds });
    }
  }
github SharePoint / sp-dev-fx-controls-react / src / controls / map / Map.tsx View on Github external
public componentWillUpdate(nextProps: IMapProps, nextState: IMapState): void {
    if (!isEqual(this.props.coordinates, nextProps.coordinates)) {
      this.setState({
        coordinates: this.props.coordinates
      });
    }
  }