When user is in page 'a' and there writes something in forms input field then goes from page a to page b and from there back to page a, here if user wants to get data from url, there could be two with the same name for example this is url ?name=james&name=alex
my question is how to get that latest 'name' for example name name=alex
is the new one. Here is how i get from url:
const query = window.location.toString().split("?")[1];
const urlParams = new URLSearchParams(query);
const Name = urlParams.get("name") || props.order?.name;
<Form.Item label={t( "orders.name")} name="name" initialValue={Name || ""}>
<Input type="string" />
</Form.Item>