minor fixes
This commit is contained in:
parent
b9a55d7033
commit
67e575bd94
|
@ -328,9 +328,9 @@ export default {
|
||||||
control: TableViewSelect,
|
control: TableViewSelect,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Detail URL",
|
label: "Table URL",
|
||||||
key: "detailUrl",
|
key: "detailUrl",
|
||||||
placeholder: "tableName/",
|
placeholder: "tableName",
|
||||||
control: Input,
|
control: Input,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,10 +60,6 @@
|
||||||
const jsonTable = await _bb.api.get(`/api/tables/${datasource.tableId}`)
|
const jsonTable = await _bb.api.get(`/api/tables/${datasource.tableId}`)
|
||||||
table = await jsonTable.json()
|
table = await jsonTable.json()
|
||||||
schema = table.schema
|
schema = table.schema
|
||||||
// schema._id = {
|
|
||||||
// type: '_id',
|
|
||||||
// options: detailUrl
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
columnDefs = Object.keys(schema).map((key, i) => {
|
columnDefs = Object.keys(schema).map((key, i) => {
|
||||||
|
@ -83,12 +79,12 @@
|
||||||
columnDefs = [...columnDefs, {
|
columnDefs = [...columnDefs, {
|
||||||
headerName: 'Details',
|
headerName: 'Details',
|
||||||
field: '_id',
|
field: '_id',
|
||||||
width: 50,
|
width: 25,
|
||||||
flex: 0,
|
flex: 0,
|
||||||
editable: false,
|
editable: false,
|
||||||
cellRenderer: getRenderer({
|
cellRenderer: getRenderer({
|
||||||
type: '_id',
|
type: '_id',
|
||||||
options: detailUrl || 'someTableName'
|
options: detailUrl
|
||||||
}),
|
}),
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -143,7 +143,7 @@ function viewDetailsRenderer(options) {
|
||||||
new ViewDetails({
|
new ViewDetails({
|
||||||
target: container,
|
target: container,
|
||||||
props: {
|
props: {
|
||||||
url: `${options}${params.data._id}`
|
url: `/${options}/${params.data._id}`
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue