mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] app: mount app in "first-child" position
We reintroduce the possibility to mount the app in first position in a target. The option "self" has been dropped since it is now possible for a component to have several top level nodes.
This commit is contained in:
committed by
Géry Debongnie
parent
06d207f60e
commit
7d7568d254
@@ -6,7 +6,7 @@ import { Component } from "./component";
|
||||
* Note that this method does modify in place the props
|
||||
*/
|
||||
export function applyDefaultProps(props: { [key: string]: any }, ComponentClass: typeof Component) {
|
||||
const defaultProps = (ComponentClass as any).defaultProps
|
||||
const defaultProps = (ComponentClass as any).defaultProps;
|
||||
if (defaultProps) {
|
||||
for (let propName in defaultProps) {
|
||||
if (props![propName] === undefined) {
|
||||
@@ -16,7 +16,6 @@ export function applyDefaultProps(props: { [key: string]: any }, ComponentClass:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Prop validation helper
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user