fix : multiline text input

Deskripsi:
- multiline pada text input komentar diskusi umum dan diskusi divisi

No Issues
This commit is contained in:
2025-09-24 16:11:57 +08:00
parent bbb25a30d2
commit 6cca0a3d08
3 changed files with 15 additions and 2 deletions

View File

@@ -210,10 +210,11 @@ export default function DetailDiscussionGeneral() {
disable={(data?.status === 2 || !data?.isActive || (!memberDiscussion && (entityUser.role == "user" || entityUser.role == "coadmin")))}
type="default"
round
placeholder="Kirim Komentar"
placeholder="Kirim Komentar2"
bg="white"
onChange={setKomentar}
value={komentar}
multiline
itemRight={
<Pressable onPress={() => {
(komentar != '' && data?.status === 1 && data?.isActive && (memberDiscussion || (entityUser.role != "user" && entityUser.role != "coadmin")))

View File

@@ -304,6 +304,7 @@ export default function DiscussionDetail() {
bg="white"
type="default"
round
multiline
placeholder="Kirim Komentar"
onChange={setKomentar}
value={komentar}

View File

@@ -40,6 +40,7 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
<View style={[
Styles.inputRoundForm,
itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft,
multiline && { alignItems: 'flex-end' },
round && Styles.round30,
{ backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' },
error && { borderColor: "red" },
@@ -53,7 +54,17 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
keyboardType={type}
onChangeText={onChange}
placeholderTextColor={'gray'}
style={[Styles.mh05, { width: width ? lebar * width / 100 : lebar * 0.78, color: 'black' }, Platform.OS == 'ios' ? { paddingVertical: 1 } : { paddingVertical: 5 }]}
multiline={multiline}
numberOfLines={3}
style={[
Styles.mh05,
multiline && { height: '100%', paddingTop: 3 },
{ width: width ? lebar * width / 100 : lebar * 0.78, color: 'black' },
Platform.OS == 'ios' ? { paddingVertical: 1 } : { paddingVertical: 5 },
multiline && {
maxHeight: 100, // batas maksimal
}
]}
/>
</View>
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}