feat: add autocomplete and lookup field types for large datasets#92
Merged
feat: add autocomplete and lookup field types for large datasets#92
Conversation
Adds IOptionProvider abstraction for async data sources, MudAutocomplete-based searchable field with debounce, and modal table lookup with MudDialog+MudTable supporting pagination, sorting, filtering, and multi-field mapping. Fixes #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new field types for handling large datasets (100-10K+ rows) that are impractical with static dropdown lists.
Fixes #27
Changes
Core Abstractions (FormCraft/)
IOptionProvider<TModel, TValue>— async search-based option provider interfaceLookupColumn<TItem>— column definition for lookup table dialogsLookupQuery/LookupResult<TItem>— query/result models for server-side paginationAsAutocomplete()extensions on FieldBuilder for searchable fields (supports both search functions and IOptionProvider)Autocomplete Field (FormCraft.ForMudBlazor/)
MudBlazorAutocompleteFieldComponent— uses MudAutocomplete with server-side search, configurable debounce and min charactersMudBlazorAutocompleteFieldRenderer— renderer that activates when AutocompleteSearchFunc or AutocompleteOptionProvider attributes are presentLookup Field (FormCraft.ForMudBlazor/)
MudBlazorLookupFieldComponent— text field with search icon that opens a MudDialog containing MudTable with pagination, sorting, and filteringMudBlazorLookupDialog— reusable dialog component with server-side data, search bar, row selectionAsLookup()extension with column configuration, value/display selectors, and field mapping callbackMudBlazorLookupFieldRenderer— renderer that activates when LookupDataProvider attribute is presentTests
Testing
Discovered Issues