Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add allowSpacesInSuggestions parameter to AutocompleteTrigger #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

biongoo
Copy link

@biongoo biongoo commented Jun 19, 2023

Description

This PR introduces a new parameter allowSpacesInSuggestions to the AutocompleteTrigger class. This allows the developer to choose whether the autocomplete suggestions can contain spaces or not.

For example, by setting allowSpacesInSuggestions to true, a trigger for '@' after typing '@john ' could even suggest results that include a space, like 'John Doe'.

The default behavior (i.e., without specifying allowSpacesInSuggestions or setting it to false) would be to return null as soon as a space is encountered after the trigger character, which means no suggestions are shown.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.54 🎉

Comparison is base (6f6dc27) 82.70% compared to head (9d8a942) 83.24%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   82.70%   83.24%   +0.54%     
==========================================
  Files           3        3              
  Lines         185      191       +6     
==========================================
+ Hits          153      159       +6     
  Misses         32       32              
Impacted Files Coverage Δ
lib/src/autocomplete_trigger.dart 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@biongoo biongoo changed the title Add allowSpacesInSuggestions parameter to AutocompleteTrigger feat: Add allowSpacesInSuggestions parameter to AutocompleteTrigger Jun 27, 2023
@xsahil03x
Copy link
Owner

Hey @biongoo nice PR. Can you explain a bit more on the triggerSet? What are they and how are they being used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants