From ca45c598628658bb93d95b4b709d8c9c42349e95 Mon Sep 17 00:00:00 2001 From: Gauthier Segay Date: Thu, 18 Jul 2024 13:32:12 +0200 Subject: [PATCH] Build fix: CreateFilterOptionsOptions needs explicit type level parameter so the property is generic. --- src/Feliz.MaterialUI/Autocomplete.fs | 4 ++-- src/Feliz.MaterialUI/Bindings.fs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Feliz.MaterialUI/Autocomplete.fs b/src/Feliz.MaterialUI/Autocomplete.fs index 169a7f5..39eea54 100644 --- a/src/Feliz.MaterialUI/Autocomplete.fs +++ b/src/Feliz.MaterialUI/Autocomplete.fs @@ -8,7 +8,7 @@ open Fable.Core.JsInterop module AutocompleteHelpers = [] - let createFilterOptions (config: CreateFilterOptionsOptions) : Func<'option [], AutocompleteFilterOptionsState, 'option []> = + let createFilterOptions (config: CreateFilterOptionsOptions<_>) : Func<'option [], AutocompleteFilterOptionsState, 'option []> = import "createFilterOptions" "@material-ui/lab/Autocomplete" type Autocomplete = @@ -21,7 +21,7 @@ type Autocomplete = ?trim: bool ) : 'option [] -> AutocompleteFilterOptionsState -> 'option [] = - let opts = jsOptions(fun o -> + let opts = jsOptions>(fun o -> if ignoreAccents.IsSome then o.ignoreAccents <- ignoreAccents.Value if ignoreCase.IsSome then o.ignoreCase <- ignoreCase.Value if matchFrom.IsSome then o.matchFrom <- matchFrom.Value diff --git a/src/Feliz.MaterialUI/Bindings.fs b/src/Feliz.MaterialUI/Bindings.fs index da6edfa..02bc925 100644 --- a/src/Feliz.MaterialUI/Bindings.fs +++ b/src/Feliz.MaterialUI/Bindings.fs @@ -455,7 +455,7 @@ type AutocompleteOnChangeReason = | Clear -type CreateFilterOptionsOptions = +type CreateFilterOptionsOptions<'option> = abstract ignoreAccents: bool with get, set abstract ignoreCase: bool with get, set abstract matchFrom: AutocompleteMatchFrom with get, set