Skip to content

Commit 8edf015

Browse files
Merge pull request #41 from divyanshu-patil/fix/default_props
fix: add editable as default prop
2 parents ba74357 + 5d01cb3 commit 8edf015

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2806,6 +2806,6 @@ SPEC CHECKSUMS:
28062806
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
28072807
Yoga: 6ca93c8c13f56baeec55eb608577619b17a4d64e
28082808

2809-
PODFILE CHECKSUM: ec2a6d3aa5fc6aa4cd75a1a1f1d3fb28c1f8abee
2809+
PODFILE CHECKSUM: 32064aec2e4fd956051ae18c71720479742bc76a
28102810

28112811
COCOAPODS: 1.15.2

example/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export default function App() {
171171
console.log(e);
172172
}}
173173
keyboardAppearance="dark"
174-
editable={true}
174+
// editable={true}
175175
lineHeight={22}
176176
fontFamily={Platform.select({ ios: 'georgia', android: 'serif' })} // fontweight won't work unless this is used
177177
fontStyle="italic"

src/TypeRichTextInput.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const TypeRichTextInput = forwardRef(
3939
(props: TypeRichTextInputProps, ref: Ref<TypeRichTextInputRef>) => {
4040
const nativeRef = useRef(null);
4141

42-
const { scrollEnabled = true, ...restProps } = props;
42+
const { scrollEnabled = true, editable = true, ...restProps } = props;
4343

4444
useImperativeHandle(ref, () => ({
4545
focus: () => {
@@ -114,6 +114,7 @@ const TypeRichTextInput = forwardRef(
114114
ref={nativeRef}
115115
{...restProps}
116116
scrollEnabled={scrollEnabled}
117+
editable={editable}
117118
onInputFocus={() => props.onFocus?.()}
118119
onInputBlur={() => props.onBlur?.()}
119120
onChangeText={handleOnChangeTextEvent}

0 commit comments

Comments
 (0)