getAddress / find

MIT License
0 stars 3 forks source link

Set initial value of the input field #2

Closed bluec closed 2 years ago

bluec commented 2 years ago

For use-cases where the postcode lookup might be using existing data (e.g. editing an address rather than adding as new) it would be useful to have the ability to set the initial value of the input field.

LeePaulSmith commented 2 years ago

Hi,

Sorry, this would be a confusing design. In the situation provided, the address data should be cleared and a new search initiated. Also, it would be unlikely the new address would be in the same postcode.

Regards

bluec commented 2 years ago

Sorry, how do you know what should happen in this situation? The library should provide flexibility for integrators to integrate it into their own workflows. Those workflows are not for you to dictate. I can 100% tell you that being able to lookup from an existing postcode is a completely valid and required real-life workflow.

Furthermore, the proposed change still allows for no initial value to be set (i.e. by default it doesn't change existing behaviour), so I can't really see any rationale for it to be rejected?