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

Search is not working when i use value as Id inside onChanged #131

Open
muralikrishnanmt opened this issue Apr 26, 2021 · 0 comments
Open

Comments

@muralikrishnanmt
Copy link

Searching is not working when i use the value as the id. Here is the code

Center(
            child: SearchableDropdown.single(
              isExpanded: true,
              value: selectedDistcrictID,
              hint: "Select one",
              searchHint: "Select one",
              items: data.map(
                (list) {
                  return DropdownMenuItem(
                    child: Text(list['district]),
                    value: `list['districtID'],`
                  );
                },
              ).toList(),
              onChanged: (value) {
                setState(() {
                  selectedDistcrictID = value;
                  print(selectedDistcrictID);
                });
              },
            ),
          ),
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

No branches or pull requests

1 participant