Skip to content

Commit

Permalink
🛠 Refactor: Rename to ModalView.nativeRefModalView
Browse files Browse the repository at this point in the history
Summary:  Rename `ModalView.nativeModalViewRef` to `nativeRefModalView`.
  • Loading branch information
dominicstop committed Jan 9, 2023
1 parent 0e8425e commit 055b3a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/ModalView/ModalView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class ModalView extends
try {
// request modal to open/close
await RNIModalViewModule.setModalVisibility(
findNodeHandle(this.nativeModalViewRef),
findNodeHandle(this.nativeRefModalView),
nextVisible
);

Expand All @@ -230,7 +230,7 @@ export class ModalView extends
try {
// request modal to send modal info
return await RNIModalViewModule.requestModalInfo(
findNodeHandle(this.nativeModalViewRef)
findNodeHandle(this.nativeRefModalView)
);
} catch (error) {
console.log('ModalView, requestModalInfo failed:');
Expand Down Expand Up @@ -336,7 +336,7 @@ export class ModalView extends
return (
<RNIModalView
ref={(r) => {
this.nativeModalViewRef = r;
this.nativeRefModalView = r;
}}
style={styles.rootContainer}
onStartShouldSetResponder={this._shouldSetResponder}
Expand All @@ -355,10 +355,10 @@ export class ModalView extends
{state.visible && (
<View
style={[styles.modalContainer, props.containerStyle]}
collapsable={false}
collapsible={false}
onLayout={this._handleOnLayout}
>
{React.cloneElement(props.children, {
{React.cloneElement(props.children as any, {
getModalRef: this._handleGetModalRef,
// pass down props received from setVisibility
...(Helpers.isObject(state.childProps) && state.childProps),
Expand Down

0 comments on commit 055b3a1

Please sign in to comment.