Skip to content

Commit f22eeb3

Browse files
authored
Adds scrollarea widgetResizeable and removeWidget (#85)
1 parent 1080c8f commit f22eeb3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/ScrollArea/RNScrollArea.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ViewProps, setViewProps } from "../View/RNView";
33
import { RNWidget } from "../config";
44

55
export interface ScrollAreaProps extends ViewProps {
6-
// TODO add props
6+
widgetResizable?: boolean;
77
}
88

99
const setScrollAreaProps = (
@@ -12,7 +12,9 @@ const setScrollAreaProps = (
1212
oldProps: ScrollAreaProps
1313
) => {
1414
const setter: ScrollAreaProps = {
15-
//TODO add props
15+
set widgetResizable(resizable: boolean) {
16+
widget.setWidgetResizable(resizable);
17+
}
1618
};
1719
Object.assign(setter, newProps);
1820
setViewProps(widget, newProps, oldProps);

src/components/View/RNView.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export class RNView extends QWidget implements RNWidget {
263263
console.warn("parent has no layout to remove child from");
264264
return;
265265
}
266-
(this.layout as FlexLayout).removeWidget(child);
266+
this.layout.removeWidget(child);
267267
child.close();
268268
}
269269
}

0 commit comments

Comments
 (0)