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.

@bind-Value issue

See original GitHub issue

I am new to Blazor, so forgive me if this issue is not related to your control. I have a Blazor page and ViewModel. If I click on BlazoredTypeahead control, my list is displayed and filtered based on user input. This works great.

<BlazoredTypeahead SearchMethod="@ViewModel.SearchPeople"
                   @bind-Value="@ViewModel.EngineeringTeamLeader"
                   EnableDropDown="false"
                   MinimumLength="3" 
                   ShowDropDownOnFocus="true">
    <SelectedTemplate Context="person">
        @person.DisplayName
    </SelectedTemplate>
    <HelpTemplate>
        Please enter at least 3 characters to perform a search.
    </HelpTemplate>
    <ResultTemplate Context="person">
        @person.DisplayFullName
    </ResultTemplate>
</BlazoredTypeahead>

in my ViewModel…

public Person EngineeringTeamLeader
{
    get => _engineeringTeamLeader;
    set
    {
        if (value == _engineeringTeamLeader)
        {
            return;
        }
        _engineeringTeamLeader = value;

        if (value != null)
        {
            _concession.EngineeringTeamLeader = value.DisplayName;
        }
        OnPropertyChanged();
    }
}

When I load the page with an existing record, I set the EngineeringTeamLeader object, however this name does not appear in the BlazoredTypeahead control. If I give the control focus and navigate away from it, the EngineeringTeamLeader name will appear. So, its appears the control knows about it, but does not initially render it.

Windows OS: Win10 20H2 Visual Studio Pro Version 16.10.0 Preview 1.0 Blazor Server-side app using .Net 5.0

Any suggestions?

Thanks,

Ron

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jsummerlincommented, Apr 29, 2021

I hit the same issue and downgrading to 4.5.0 fixed it.

4reactions
mjharwoodcommented, Apr 28, 2021

Downgrading the version 4.5.0. resolves my issue.

I’ve hit the same issue, and downgrading from 4.6.0 to 4.5.1 (and 4.5.0) resolved the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error on bindValue - php
I'm using PHP, Mysql and XAMPP. The connection is fine already.. I tested some data inputs on a basic form etc. but My...
Read more >
PDOStatement::bindValue - Manual
Binds a value to a corresponding named or question mark placeholder in the SQL statement that was used to prepare the statement. Parameters...
Read more >
Custom BindValue · Issue #1828 · ng-select/ ...
i need my bindvalue to have an object different from the selected one, is that possible? create a custom function for bindvalue.
Read more >
How to avoid replacing some `?` in bindValue · Issue #3078
I have query fragment WHERE n.attributes ? ? and then execute $statement = $this->getEntityManager()->getConnection()->prepare($sql); ...
Read more >
Difference between bindParam and bindValue in PHP
The PDOStatement::bindParam() function is an inbuilt function in PHP that is used to bind a parameter to the specified variable name.
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