Fix react props warning
This commit is contained in:
parent
68e995918a
commit
a197459e4d
1 changed files with 11 additions and 17 deletions
|
@ -15,29 +15,23 @@ import TypeDeChamps from './components/TypeDeChamps';
|
||||||
library.add(faArrowDown, faArrowsAltV, faArrowUp, faTrash);
|
library.add(faArrowDown, faArrowsAltV, faArrowUp, faTrash);
|
||||||
|
|
||||||
class TypesDeChampEditor extends Component {
|
class TypesDeChampEditor extends Component {
|
||||||
constructor({
|
constructor(props) {
|
||||||
baseUrl,
|
super(props);
|
||||||
typeDeChampsTypes,
|
|
||||||
directUploadUrl,
|
|
||||||
isAnnotation,
|
|
||||||
typeDeChamps
|
|
||||||
}) {
|
|
||||||
super({ typeDeChamps });
|
|
||||||
const defaultTypeDeChampAttributes = {
|
const defaultTypeDeChampAttributes = {
|
||||||
type_champ: 'text',
|
type_champ: 'text',
|
||||||
types_de_champ: [],
|
types_de_champ: [],
|
||||||
private: isAnnotation,
|
private: props.isAnnotation,
|
||||||
libelle: `${isAnnotation ? 'Nouvelle annotation' : 'Nouveau champ'} ${
|
libelle: `${
|
||||||
typeDeChampsTypes[0][0]
|
props.isAnnotation ? 'Nouvelle annotation' : 'Nouveau champ'
|
||||||
}`
|
} ${props.typeDeChampsTypes[0][0]}`
|
||||||
};
|
};
|
||||||
this.state = {
|
this.state = {
|
||||||
flash: new Flash(isAnnotation),
|
flash: new Flash(props.isAnnotation),
|
||||||
queue: new OperationsQueue(baseUrl),
|
queue: new OperationsQueue(props.baseUrl),
|
||||||
defaultTypeDeChampAttributes,
|
defaultTypeDeChampAttributes,
|
||||||
typeDeChampsTypes,
|
typeDeChampsTypes: props.typeDeChampsTypes,
|
||||||
directUploadUrl,
|
directUploadUrl: props.directUploadUrl,
|
||||||
isAnnotation
|
isAnnotation: props.isAnnotation
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue