GithubHelp home page GithubHelp logo

zleao / zoft.mauiextensions.autocompleteentry Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 6.0 4.79 MB

AutoComplete Entry control for .Net MAUI that provides a list of suggestions as the user types

License: MIT License

C# 100.00%
autocomplete csharp dotnet6 dotnet7 entry maui nuget nuget-package

zoft.mauiextensions.autocompleteentry's People

Contributors

gsgou avatar zleao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

zoft.mauiextensions.autocompleteentry's Issues

Hello, I edited your project and placed the AutoCompleteEntry element in my own ContentViews to add my properties (HeaderProperty, ListOfItemsProperty, TxtProperty). Unfortunately, I am solving a problem with the TextProperty property binding.

Hello, I edited Your project and placed the AutoCompleteEntry element in my own ContentViews to add my properties (HeaderProperty, ListOfItemsProperty, TxtProperty). Unfortunately, I am solving a problem with the TextProperty property binding.
NewPage1ViewModel is used on the NewPage1.xaml page, where in the constructor I set the default value this.Text01 = "The default value of the Text01 property when the VM is initialized";, unfortunately, this value is not written when the application starts in the required <controls:AutoCompleteEntryContentView Header="Vehicle brand:" Txt="{Binding Text01, Mode=TwoWay}" ListOfItems="{Binding ListItemText01, Mode=TwoWay}" ></controls:AutoCompleteEntryContentView>.
Unfortunately, binding to the Txt item is broken. The txt entry is set 2x when the project is started, the first time with the correct text from the VM and the second time as an empty string.
Can someone help me with this problem?
(google translator)

MauiAppAutoCompeteEntry.zip
https://drive.google.com/file/d/14APs_dURRwzPWWUnmTjUGzOQiAC_1O9w/view?usp=sharing

.Net 7
Tested on Samsung Xcover6 pro (Android 13) and Windows 11 (22H2)

Is there a way to remove the X?

Hi @zleao ,

Thank you so much for producing this component. Really very useful. However, I have a problem that can perhaps be solved and for this reason I ask for your help.
When an element is selected, the classic X appears to cancel the selection just made. Would it be possible to delete it and disable this option?

Let me know

Thank you again

iOS/Android - Tapping outside of the keyboard does not close the keyboard

On both iOS and Android, whenever I tap outside of the keyboard, the keyboard does not close. This is not a big deal on Android because the done button and the built in down arrow both work to close the keyboard. However, on iOS, there is no way to close the keyboard due to the issue of the done button also not working (#10).

Server side filtering

I've found that this component doesn't work well when I am calling an API to get filtered results before updating the observable collection. Is that intended?

CursorPosition is always 0 and user cannot continue in typing in the middle of the text

When some text has already been added and a user taps somewhere in the middle of the text and starts typing, it will immediately jump at the end of the text.

Recording.2024-07-07.223054.mp4

And the CursorPosition of the entry is always 0 and cannot be changed programmatically.

private void LocalAutoCompleteEntry_TextChanged(object sender, zoft.MauiExtensions.Controls.AutoCompleteEntryTextChangedEventArgs e)
{
  if (sender is zoft.MauiExtensions.Controls.AutoCompleteEntry entry && e.Reason == zoft.MauiExtensions.Controls.AutoCompleteEntryTextChangeReason.UserInput)
  {
    var test = entry.CursorPosition;
  }
}

It's happening on Anrdoid, didn't test it on iOS yet.

"Collection was modified; enumeration operation may not execute."

Impossible to get past the following error on start:

System.InvalidOperationException: 'Collection was modified; enumeration operation may not execute.'

I understand this has to do with a kind of "circular binding" (perhaps not the right phrase) because the modified by adding FilteredList feeds to the binding??

Surely, there must be a workaround for this issue and wondering what you suggest. Otherwise this is a great contribution.

With thanks.

iOS - Done button doesn't close keyboard

On Android when I press the "done" button on the keyboard, the keyboard is closed. On iOS, this does not happen. Pressing "done" does nothing on iOS.

There is no way to close the keyboard due to the other issue of clicking outside of the keyboard also not closing the keyboard. (#9)

[FEATURE] Multi-select?

What a beautiful control.. but I wonder if there's any plan to add multi-selection support. Selections would appear in the entry field as "chips" or "tokens" (not sure what the preferred terminology is). There would be an option to allow manual entry of an item not found in ItemsSource. But by default, text entry in this mode would only drive autocomplete.

Can't set text

Hi, this is my entry, it's inside DataTemplate of CollectionView

<zoft:AutoCompleteEntry
 Grid.Column="0"
 Margin="5"
 DisplayMemberPath="nomeCognome"
 FontAttributes="Bold"
 FontSize="{markups:OnScreenSize
 Medium='10',
 Large='15',
 ExtraLarge='25'}"
 ItemsSource="{Binding Path=AsbItemsource, Mode=OneWay}"
 Text="{Binding Path=Name, Mode=TwoWay}"
 TextChangedCommand="{Binding Path=TextChangedCommand, Mode=OneWay}"
 TextMemberPath="nomeCognome"
/>

It works fine when I insert data. But if I attach the new ItemSource already filled with information AutoCompleteEntry will not display the text. Basically If I change field "Name" from code behind entry will not dispaly it. How to achive this? Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.