Add props to the "CreateObject" popup (#2552)

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@xored.com>
This commit is contained in:
Sergei Ogorelkov 2023-01-27 17:43:42 +06:00 committed by GitHub
parent 7669e96b07
commit dd68380e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -150,7 +150,7 @@
return
}
const c = create
showPopup(c.component, {}, 'top', async (res) => {
showPopup(c.component, c.props ?? {}, 'top', async (res) => {
if (res != null) {
// We expect reference to new object.
const newPerson = await client.findOne(_class, { _id: res })

View File

@ -19,6 +19,7 @@ export interface ObjectSearchResult {
*/
export interface ObjectCreate {
component: AnyComponent
props?: Record<string, any>
label: IntlString
update?: (doc: Doc) => string
}