update select dropDown

This commit is contained in:
2025-11-10 00:08:33 +07:00
parent fd80f63bbe
commit 45746a6a0f
2 changed files with 4 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ export interface SelectProps {
mode?: "single" | "multiple"; // multiple not implemented yet
style?: StyleProp<ViewStyle>;
size?: "small" | "middle" | "large";
listStyle?: StyleProp<ViewStyle>;
}
/**
@@ -50,6 +51,7 @@ const Select: React.FC<SelectProps> = ({
showSearch = false,
mode = "single",
style,
listStyle,
size = "middle",
}) => {
const [selectedValue, setSelectedValue] = useState<
@@ -152,7 +154,7 @@ const Select: React.FC<SelectProps> = ({
autoFocus
/>
)}
<ScrollView style={styles.list}>
<ScrollView style={[styles.list, listStyle]}>
{filteredOptions.map((item) => (
<TouchableOpacity
key={item.value}

View File

@@ -316,6 +316,7 @@ const CreateOrUpdateHaulModal: React.FC<CreateOrUpdateHaulModalProps> = ({
onChange={onChange}
placeholder="Chọn đơn vị"
disabled={!isEditing}
listStyle={{ maxHeight: 100 }}
/>
{errors.fish?.[index]?.unit && (
<Text style={styles.errorText}>