Merge pull request #14700 from Budibase/view-ui-metadata
Add uiMetadata to viewV2
This commit is contained in:
commit
a583b824c2
|
@ -133,6 +133,7 @@ export async function create(ctx: Ctx<CreateViewRequest, ViewResponse>) {
|
||||||
sort: view.sort,
|
sort: view.sort,
|
||||||
schema,
|
schema,
|
||||||
primaryDisplay: view.primaryDisplay,
|
primaryDisplay: view.primaryDisplay,
|
||||||
|
uiMetadata: view.uiMetadata,
|
||||||
}
|
}
|
||||||
const result = await sdk.views.create(tableId, parsedView)
|
const result = await sdk.views.create(tableId, parsedView)
|
||||||
ctx.status = 201
|
ctx.status = 201
|
||||||
|
@ -169,6 +170,7 @@ export async function update(ctx: Ctx<UpdateViewRequest, ViewResponse>) {
|
||||||
sort: view.sort,
|
sort: view.sort,
|
||||||
schema,
|
schema,
|
||||||
primaryDisplay: view.primaryDisplay,
|
primaryDisplay: view.primaryDisplay,
|
||||||
|
uiMetadata: view.uiMetadata,
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await sdk.views.update(tableId, parsedView)
|
const result = await sdk.views.update(tableId, parsedView)
|
||||||
|
|
|
@ -177,6 +177,9 @@ describe.each([
|
||||||
visible: true,
|
visible: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
uiMetadata: {
|
||||||
|
foo: "bar",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
const res = await config.api.viewV2.create(newView)
|
const res = await config.api.viewV2.create(newView)
|
||||||
|
|
||||||
|
@ -640,6 +643,9 @@ describe.each([
|
||||||
readonly: true,
|
readonly: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
uiMetadata: {
|
||||||
|
foo: "bar",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
await config.api.viewV2.update(updatedData)
|
await config.api.viewV2.update(updatedData)
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ export interface ViewV2 {
|
||||||
type?: SortType
|
type?: SortType
|
||||||
}
|
}
|
||||||
schema?: ViewV2Schema
|
schema?: ViewV2Schema
|
||||||
|
uiMetadata?: Record<string, any>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ViewV2Schema = Record<string, ViewFieldMetadata>
|
export type ViewV2Schema = Record<string, ViewFieldMetadata>
|
||||||
|
|
Loading…
Reference in New Issue