specific-silverS
Refine3y ago
22 replies
specific-silver

useSelect - Populate Input Based on Dropdown Selection

Hi!

I have the dropdown --

const { selectProps: selectProductProps } = useSelect({
        resource: "products",
        optionLabel: "ProductCode",
        optionValue: "ProductID",
    })


the resource products also returns an associated UnitPrice value.

I also have an <Input/> for UnitPrice.

How could I make it so that, when the user selects a product, the <Input/> is repopulated to the new UnitPrice of the product?
Was this page helpful?