ArtemyB / Feliz.MaterialUI

Feliz-style Fable bindings for Material-UI
https://artemyb.github.io/Feliz.MaterialUI/
MIT License
5 stars 3 forks source link

Incorrect binding to the `renderOption` prop of the `Autocomplete` component #5

Closed ArtemyB closed 1 year ago

ArtemyB commented 1 year ago

The correct signature for MUI v5 is the following (from the MUI docs):

function(props: object, option: T, state: object) => ReactNode

However the current Feliz.MaterialUI prop-binding has only 2 parameters (in MUI v4 there were only option and state parameters).

The new props parameter should be passed to the renderOption's output li-element to ensure that Autocomplete works correctly. Found this explanation in this SO-answer.