updated field id to uniqueId with lodash

This commit is contained in:
xifengjin88 2018-02-06 20:18:38 -05:00 committed by Shawn Erquhart
parent 78e5748d25
commit fa8003e361

View File

@ -2,6 +2,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import ImmutablePropTypes from "react-immutable-proptypes"; import ImmutablePropTypes from "react-immutable-proptypes";
import { Map } from 'immutable'; import { Map } from 'immutable';
import { uniqueId } from 'lodash';
import ValidationErrorTypes from 'Constants/validationErrorTypes'; import ValidationErrorTypes from 'Constants/validationErrorTypes';
const truthy = () => ({ error: false }); const truthy = () => ({ error: false });
@ -194,7 +195,7 @@ export default class Widget extends Component {
onAddAsset, onAddAsset,
onRemoveInsertedMedia, onRemoveInsertedMedia,
getAsset, getAsset,
forID: field.get('name'), forID: uniqueId(field.get('name')),
ref: this.processInnerControlRef, ref: this.processInnerControlRef,
classNameWrapper, classNameWrapper,
classNameWidget, classNameWidget,