Skip to content

Commit

Permalink
box layout fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
a7ul committed Mar 7, 2021
1 parent 8a887e4 commit 1b5d5db
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/BoxView/RNBoxView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ const setBoxViewProps = (
*/
export class RNBoxView extends QWidget implements RNComponent {
native: any;
_layout?: QBoxLayout;
initialProps?: BoxViewProps;
children: Array<NodeWidget<any>> = [];

get layout() {
return this.layout;
return super.layout as QBoxLayout | undefined;
}

set layout(l: QBoxLayout) {
this._layout = l;
set layout(l: QBoxLayout | undefined) {
super.layout = l;
}

setProps(newProps: BoxViewProps, oldProps: BoxViewProps): void {
if (this.layout) {
setBoxViewProps(this, newProps, oldProps);
Expand Down

0 comments on commit 1b5d5db

Please sign in to comment.