因此,我正在尝试使用试剂渲染MUi自动完成功能。这是我的尝试
database
我尝试将其直接传递为(def options
(clj->js
[{:title "title" :year 1990}
{:title "title2" :year 2990}]))
(defn autocomplete-text-field []
[:> TextField
{:label "Headers"
:id "header"
:variant "outlined"
:fullWidth true }
]
)
(defn add-header-form []
[:> Card
{:style #js {:max-width 1000}}
[:> CardHeader {:title "Add Header"}]
[:> CardContent
[:> Grid
{:container true
:direction "column"}
[:> Autocomplete
{
:renderInput (r/reactify-component autocomplete-text-field)
:options options
:getOptionLabel #(get % :year)}
]
]
]]
)
,但无法弄清楚。我正在尝试翻译Mui页面中的示例:
https://material-ui.com/components/autocomplete/
编辑
:renderInput autocomplete-text-field
那么我该如何为那个renderInput属性编写等效的试剂代码呢?
谢谢。