mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Force string value in content-manager edit container PluginHeaderTitle
This commit is contained in:
parent
9412b1c8b8
commit
c9ce0070b1
@ -11,7 +11,7 @@ import { connect } from 'react-redux';
|
|||||||
import { bindActionCreators, compose } from 'redux';
|
import { bindActionCreators, compose } from 'redux';
|
||||||
import { createStructuredSelector } from 'reselect';
|
import { createStructuredSelector } from 'reselect';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { map, get, isObject, isEmpty, replace, toNumber } from 'lodash';
|
import { map, get, isObject, isEmpty, replace, toNumber, toString } from 'lodash';
|
||||||
import { router } from 'app';
|
import { router } from 'app';
|
||||||
|
|
||||||
// Components.
|
// Components.
|
||||||
@ -177,13 +177,13 @@ export class Edit extends React.Component {
|
|||||||
const mainField = get(this.props.models, `${this.props.currentModelName}.info.mainField`) || primaryKey;
|
const mainField = get(this.props.models, `${this.props.currentModelName}.info.mainField`) || primaryKey;
|
||||||
const pluginHeaderTitle = this.props.isCreating ? 'New entry' : templateObject({ mainField }, this.props.record.toJS()).mainField;
|
const pluginHeaderTitle = this.props.isCreating ? 'New entry' : templateObject({ mainField }, this.props.record.toJS()).mainField;
|
||||||
const pluginHeaderDescription = this.props.isCreating ? 'New entry' : `#${this.props.record && this.props.record.get(primaryKey)}`;
|
const pluginHeaderDescription = this.props.isCreating ? 'New entry' : `#${this.props.record && this.props.record.get(primaryKey)}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className={`container-fluid ${styles.containerFluid}`}>
|
<div className={`container-fluid ${styles.containerFluid}`}>
|
||||||
<PluginHeader
|
<PluginHeader
|
||||||
title={{
|
title={{
|
||||||
id: pluginHeaderTitle,
|
id: toString(pluginHeaderTitle),
|
||||||
}}
|
}}
|
||||||
description={{
|
description={{
|
||||||
id: 'plugin-content-manager-description',
|
id: 'plugin-content-manager-description',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user