fix : multiline text input
Deskripsi: - multiline pada text input komentar diskusi umum dan diskusi divisi No Issues
This commit is contained in:
@@ -210,10 +210,11 @@ export default function DetailDiscussionGeneral() {
|
|||||||
disable={(data?.status === 2 || !data?.isActive || (!memberDiscussion && (entityUser.role == "user" || entityUser.role == "coadmin")))}
|
disable={(data?.status === 2 || !data?.isActive || (!memberDiscussion && (entityUser.role == "user" || entityUser.role == "coadmin")))}
|
||||||
type="default"
|
type="default"
|
||||||
round
|
round
|
||||||
placeholder="Kirim Komentar"
|
placeholder="Kirim Komentar2"
|
||||||
bg="white"
|
bg="white"
|
||||||
onChange={setKomentar}
|
onChange={setKomentar}
|
||||||
value={komentar}
|
value={komentar}
|
||||||
|
multiline
|
||||||
itemRight={
|
itemRight={
|
||||||
<Pressable onPress={() => {
|
<Pressable onPress={() => {
|
||||||
(komentar != '' && data?.status === 1 && data?.isActive && (memberDiscussion || (entityUser.role != "user" && entityUser.role != "coadmin")))
|
(komentar != '' && data?.status === 1 && data?.isActive && (memberDiscussion || (entityUser.role != "user" && entityUser.role != "coadmin")))
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ export default function DiscussionDetail() {
|
|||||||
bg="white"
|
bg="white"
|
||||||
type="default"
|
type="default"
|
||||||
round
|
round
|
||||||
|
multiline
|
||||||
placeholder="Kirim Komentar"
|
placeholder="Kirim Komentar"
|
||||||
onChange={setKomentar}
|
onChange={setKomentar}
|
||||||
value={komentar}
|
value={komentar}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
|||||||
<View style={[
|
<View style={[
|
||||||
Styles.inputRoundForm,
|
Styles.inputRoundForm,
|
||||||
itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft,
|
itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft,
|
||||||
|
multiline && { alignItems: 'flex-end' },
|
||||||
round && Styles.round30,
|
round && Styles.round30,
|
||||||
{ backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' },
|
{ backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' },
|
||||||
error && { borderColor: "red" },
|
error && { borderColor: "red" },
|
||||||
@@ -53,7 +54,17 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
|
|||||||
keyboardType={type}
|
keyboardType={type}
|
||||||
onChangeText={onChange}
|
onChangeText={onChange}
|
||||||
placeholderTextColor={'gray'}
|
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>
|
</View>
|
||||||
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
|
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
|
||||||
|
|||||||
Reference in New Issue
Block a user