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 18:43:42 +07:00
committed by GitHub
parent 7669e96b07
commit dd68380e7e
2 changed files with 2 additions and 1 deletions
@@ -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 })
+1
View File
@@ -19,6 +19,7 @@ export interface ObjectSearchResult {
*/
export interface ObjectCreate {
component: AnyComponent
props?: Record<string, any>
label: IntlString
update?: (doc: Doc) => string
}