feat: autosuggest for Link fields on data table records - #455
Closed
esafwan wants to merge 3 commits into
Closed
Conversation
…cList call Instead of calling getTableSchema which requires a registry record name, use direct db.getDocList query on 'Huf Data Table' to resolve the target doctype's schema (specifically title_field_name) using the doctype_name.
Contributor
Author
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
<Input>previously used forLinkfieldtype columns with a properLinkFieldInputcomponent: async, debounced search against the target Huf Data Table's rows, results shown in a searchable dropdown (reusing the existingComboboxprimitive already used inTriggerFieldsRenderer.tsx), selecting a row sets the actual link value.validators.py) — no backend change needed for that part.Comboboxwith two new optional, backward-compatible props (onSearchChange,shouldFilter) so other future async-search dropdowns can reuse it too.Bugs found and fixed during live verification (not just static checks)
get_table_schema(field.options), butfield.optionsholds the target's doctype_name whileget_table_schemaexpects the Huf Data Table registry record's own name — these are different identifiers and the call failed with "not found". Fixed by resolving the registry record directly viadb.getDocList('Huf Data Table', { filters: [['doctype_name', '=', targetDoctype]] }).Screenshots (live bench)
Autosuggest dropdown while typing:

After selecting a row:

Test plan
yarn typecheck— 0 errorsyarn lint— 0 errors (60 pre-existing unrelated warnings)