question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement - Missing Event in material:TextField - Completed

See original GitHub issue

I want to achieve the equivalent to the following for material:TextField

<Entry Text="Serch Text">
    <Entry.Behaviors>
        <toolkit:EventToCommandBehavior Command="{Binding SearchCommand}" EventName="Completed" />
    </Entry.Behaviors>
</Entry>

i.e. I want to react to certain events like Focused, Unfocused, Completed etc. that exist for plain MAUI controls.

I tried this:

<material:TextField Title="Search Text" Text="{Binding SearchText}">
    <material:TextField.Behaviors>
        <toolkit:EventToCommandBehavior Command="{Binding SearchCommand}" EventName="Completed" />
    </material:TextField.Behaviors>
</material:TextField>

does not work, the event does not existing!

Can you enable the Completed Event on the TextField or do I have to use a different approach?

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
enisncommented, May 11, 2023

Unfocused & Focused events were fixed, so I closed other issues for those, this issue can stand for Completed event.

Completed event didn’t exist in TextField, so it’s a new feature. But using Commands is a better approach, There is an equivalent command to Completed event which is ReturnCommand, and I worked that command too. It’s working well now. So, implementing it as event isn’t a mandatory currently. But still PR is welcome for this event.


As a short answer, I closed those issues by assuming they’re referencing a bug on Unfocused & Focused events. And I left this issue open because the issue refers to Completed event. (which is currently doesn’t exist)

0reactions
Sullivan008commented, May 22, 2023

Thanks for your answer @enisn !

I actually want to convert it to Command using the Community - Toolkit and manage it as such.

When is the milestone scheduled or when is the feature scheduled? I’m only asking so I know when to schedule in my code the implementation of the new feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't edit Text Field in Material-UI
In this example I used state for storing current text field value. I see, that you use props for that, but the principle...
Read more >
Text fields - Material Design
Text fields let users enter, edit, and select text.
Read more >
TextInputLayout
Returns the text color used by the hint in both the collapsed and expanded states, or null if no color has been set....
Read more >
React Text Field component - Material UI
The TextField wrapper component is a complete form control including a label, input, and help text. It comes with three variants: outlined (default),...
Read more >
TextField class - material library - Dart API
A text field lets the user enter text, either with hardware keyboard or with an onscreen keyboard. The text field calls the onChanged...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found