Closed DimaDevel closed 4 years ago
did you make some modifications? custom components?
No, I didn't make any modifications. I tried to use a snippet of code from your documents. But I got an error. Can I set recordId in the config?
Facing similar issue. I was trying to add AdminBro to my existing application.
Installed libraries:
"admin-bro": "^2.2.7", "admin-bro-expressjs": "^2.0.4", "admin-bro-sequelizejs": "^0.4.0"
I think i got the issue . Suppose this is my Model.
const testUser = sequelizeClient.define('TestUser', { id: { type: DataTypes.STRING, allowNull: false, primaryKey: true, field: 'ID' }, fullName: { type: DataTypes.STRING, allowNull: true, field: 'Fullname' }, role: { type: DataTypes.STRING, allowNull: true, field: 'Role' }, email: { type: DataTypes.STRING, allowNull: true, field: 'Email' } }
Here, the attribute name does not exactly match the 'field' name I provided for the attribute. Once i made them exactly same (matching the case) it started working. Like this:
const testUser = sequelizeClient.define('TestUser', { id: { type: DataTypes.STRING, allowNull: false, primaryKey: true, field: 'id' }, fullName: { type: DataTypes.STRING, allowNull: true, field: 'fullName' }, role: { type: DataTypes.STRING, allowNull: true, field: 'role' }, email: { type: DataTypes.STRING, allowNull: true, field: 'email' } }
Now i would like to know, what could we do in case i want my 'field' value different from the attribute name.
I got an error while trying to go to the /admin/resources/User page Error: you must specify "recordId" for the record action
Installed libraries and their versions
admin-bro@2.2.5
admin-bro-expressjs@2.0.4
admin-bro-mongoose@0.5.1 ... mongo, express (whatever you think is relevant)
How can I fix this error?