thêm FormSearch trong map
This commit is contained in:
@@ -91,8 +91,14 @@ const ShipSearchForm = (props: ShipSearchFormProps) => {
|
||||
reset({
|
||||
ship_name: props.initialValues.ship_name || "",
|
||||
reg_number: props.initialValues.reg_number || "",
|
||||
ship_length: [0, 100],
|
||||
ship_power: [0, 100000],
|
||||
ship_length: [
|
||||
props.initialValues.ship_length?.[0] || 0,
|
||||
props.initialValues.ship_length?.[1] || 100,
|
||||
],
|
||||
ship_power: [
|
||||
props.initialValues.ship_power?.[0] || 0,
|
||||
props.initialValues.ship_power?.[1] || 100000,
|
||||
],
|
||||
ship_type: props.initialValues.ship_type || "",
|
||||
alarm_list: props.initialValues.alarm_list || "",
|
||||
ship_group_id: props.initialValues.ship_group_id || "",
|
||||
@@ -129,7 +135,9 @@ const ShipSearchForm = (props: ShipSearchFormProps) => {
|
||||
|
||||
const onSubmitForm = (data: SearchShipResponse) => {
|
||||
props.onSubmit?.(data);
|
||||
props.onClose();
|
||||
console.log("Data: ", data);
|
||||
|
||||
// props.onClose();
|
||||
};
|
||||
|
||||
const onReset = () => {
|
||||
@@ -317,6 +325,7 @@ const ShipSearchForm = (props: ShipSearchFormProps) => {
|
||||
value: type.id || 0,
|
||||
}))}
|
||||
placeholder="Chọn loại tàu"
|
||||
mode="multiple"
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
/>
|
||||
@@ -339,6 +348,7 @@ const ShipSearchForm = (props: ShipSearchFormProps) => {
|
||||
value: type.value || "",
|
||||
}))}
|
||||
placeholder="Chọn loại cảnh báo"
|
||||
mode="multiple"
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
/>
|
||||
@@ -361,12 +371,14 @@ const ShipSearchForm = (props: ShipSearchFormProps) => {
|
||||
value: group.id || "",
|
||||
}))}
|
||||
placeholder="Chọn đội tàu"
|
||||
mode="multiple"
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</View>
|
||||
<View className="h-12"></View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user