From 67c6c1902f30bc75a410f11aade9c2a7bff7678f Mon Sep 17 00:00:00 2001 From: soupette Date: Mon, 30 Apr 2018 15:37:26 +0200 Subject: [PATCH] Fixes #1065 --- .../admin/src/containers/ModelPage/index.js | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/packages/strapi-plugin-content-type-builder/admin/src/containers/ModelPage/index.js b/packages/strapi-plugin-content-type-builder/admin/src/containers/ModelPage/index.js index c350023b74..c075dae695 100644 --- a/packages/strapi-plugin-content-type-builder/admin/src/containers/ModelPage/index.js +++ b/packages/strapi-plugin-content-type-builder/admin/src/containers/ModelPage/index.js @@ -50,6 +50,7 @@ import styles from './styles.scss'; // Array of attributes that the ctb can handle at the moment const availableAttributes = Object.keys(forms.attribute); +availableAttributes.push('integer', 'decimal', 'float'); /* eslint-disable jsx-a11y/no-static-element-interactions */ /* eslint-disable react/jsx-wrap-multilines */ @@ -89,25 +90,6 @@ export class ModelPage extends React.Component { // eslint-disable-line react/pr } } - // componentWillUpdate(nextProps) { - // if (!isEmpty(nextProps.menu)) { - // const allowedPaths = nextProps.menu.reduce((acc, current) => { - // const models = current.items.reduce((acc, current) => { - // acc.push(current.name); - // - // return acc; - // }, []); - // return acc.concat(models); - // }, []); - // - // const shouldRedirect = allowedPaths.filter(el => el === this.props.match.params.modelName.split('&')[0]).length === 0; - // - // if (shouldRedirect) { - // this.props.history.push('/404'); - // } - // } - // } - componentDidUpdate(prevProps) { if (prevProps.match.params.modelName !== this.props.match.params.modelName) { this.props.resetShowButtonsProps();