Move some custorder logic to handler; allow force-swap of product selection
This commit is contained in:
parent
b0fa559760
commit
4d33e3dcbe
3 changed files with 24 additions and 60 deletions
|
@ -32,10 +32,17 @@ const TailboneAutocomplete = {
|
|||
// allows for the "label" to display correctly as well
|
||||
initialLabel: String,
|
||||
|
||||
// TODO: i am not sure this is needed? but current logic does
|
||||
// handle it specially, so am leaving for now. if this prop
|
||||
// is set by the caller, then the `assignedLabel` will *always*
|
||||
// be shown for the button (when "selection" has been made)
|
||||
// while the `initialLabel` above is useful for setting the
|
||||
// *initial* label (of course), it cannot be used to
|
||||
// arbitrarily update the label during the component's life.
|
||||
// if you do need to *update* the label after initial page
|
||||
// load, then you should set `assignedLabel` instead. one
|
||||
// place this happens is in /custorders/create page, where
|
||||
// product autocomplete shows some results, and user clicks
|
||||
// one, but then handler logic can forcibly "swap" the
|
||||
// selection, causing *different* product data to come back
|
||||
// from the server, and autocomplete label should be updated
|
||||
// to match. this feels a bit awkward still but does work..
|
||||
assignedLabel: String,
|
||||
|
||||
// simple placeholder text for the input box
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue