6,512 questions
172
votes
10
answers
314k
views
Warning: Use the 'defaultValue' or 'value' props on <select> instead of setting 'selected' on <option>
SCENARIO A user has a dropdown and he selects an option. I want to display that dropdown and make that option a default value which was selected by that user last time.
I am using selected attribute ...
69
votes
12
answers
165k
views
How should I customize DropdownButtons and DropdownMenuItems in Flutter?
The default DropdownButton with DropdownMenuItems returns a light-grey dropdown. How should I customize the dropdown (e.g. background color, dropdown width)? I can change the style property in both ...
57
votes
9
answers
180k
views
Flutter dropdown text field
I am still new to Flutter. Is there an example of a material dropdown list text field? I saw the example on Material Text Field but I didn't find anywhere in the documentation on how to implement this....
43
votes
12
answers
39k
views
Drop-Down List in UITableView in iOS
How to Create this type of tableview in iOS??
Here, If we tap on 1st row 'Account', then automatically it scrolled with some more rows which is showing in Image.
And if again we tap on Account, then ...
32
votes
8
answers
53k
views
Adding icon to left of DropDownButton (expanded) in flutter
I want to add icon to left of DropDownButton but can't find a way to do so.
What I want to achieve is like this:
I have tried following code but it places icon to right where I don't want it and it ...
24
votes
5
answers
69k
views
How to open DropDown dialog below DropdownButton like Spinner in Flutter?
I want to open DropDown dialog below DropdownButton like Spinner in Flutter. Right now its open over Button widget and when I select last item and re-open as down side.
Code:
import 'package:flutter/...
22
votes
6
answers
82k
views
Set default value for dropdown button in flutter
I have a dropdown button which works fine, but when I try to set a default value it will fail with the following error:
'package:flutter/src/material/dropdown.dart': Failed assertion: line 620 pos ...
20
votes
2
answers
23k
views
How to add click event to whole view in SwiftUI
I'm developing SwiftUI test app and I added my custom DropDown menu here.
Dropdown works fine but I want to dismiss dropdown menu when user click dropdown menu outside area.
Here's my dropdown menu.
...
16
votes
3
answers
20k
views
How can I set the width of HTML <select> element, without considering the width of each option
Actually I know the select box width is set by the longest option in the list, but I want to increase the length (width) of a select html element.
I also searched and I understand this code style="...
15
votes
3
answers
27k
views
Use different key for searching instead of value or label in react-select in reactJS
I am using react-select as a searchable drop-down in my react app.
I am referring this link https://github.com/JedWatson/react-select.
In the drop-down options structure, it needs label and value ...
15
votes
10
answers
52k
views
Dropdown selection not displaying with Flutter
I' m gettings items from JSON and displaying them in a dropdown. When the person select an item from the dropdown list, I get the selection but the selected item doesn't change.
For example we have (...
15
votes
4
answers
202k
views
Fetching data from MySQL database to HTML dropdown list
I have a web site that contains an HTML form, in this form I have a dropdownlist with list of agents that works in the company, I want to fetch data from MySQL database to this dropdownlist so when ...
14
votes
3
answers
440
views
When click on second dropdown black box should remain visible
In this dropdown nav I'm building if a dropdown is opened and you click to open a second one, the black box should remain visible. At the moment the black box disappears when you click on a second ...
13
votes
1
answer
16k
views
Can't resolve 'react-transition-group' in primereact dropdown
I am getting the following error-
Failed to compile
./node_modules/primereact/components/dropdown/DropdownPanel.js
Module not found: Can't resolve 'react-transition-group' in 'D:\my-app\node_modules\...
13
votes
7
answers
14k
views
Android Spinner: Remove Extra White Space Between Text and Dropdown Icon
I have a spinner and by default there is extra white-space between text and dropdown icon which I really don't like and wanna remove it.
Tried searching over the web but did not get anything which ...
11
votes
2
answers
15k
views
How to fix Flutter dropdown button overflow issue?
I create a Flutter Form and I build a dropdown button with flutter. I am losing local son data into dropdown. Some of my items in dropdown button is long. I use SafeArea and ListView and I am getting ...
11
votes
2
answers
10k
views
How do I create a keyValue pair (display field) by combining/having two fields in CakePHP 3?
I need help getting two values (for human friendly dropdown) in a key-value pair using find or get or anything else. I need help with the simplest method of doing this in CakePHP.
Here's my attempt:
...
10
votes
7
answers
25k
views
Using PHP to populate a <select></select> dropdown? [duplicate]
<select name="select">
</select>
I want to populate the above tag with values from database.
I have written PHP code up to this.
while($row=mysql_fetch_array($result))
{
...
10
votes
2
answers
45k
views
Laravel dynamic dropdown country and state
I'm trying to make two dropdown menus. These are the countries and states selections from my database. My problem is don't know how to make conditions that states must be dependent on countries. When ...
10
votes
3
answers
10k
views
Error when selecting a dropdown item in Flutter
I have a problem with a Flutter dropdown. When I select one of the items it throws an error:
Another exception was thrown: 'package:flutter/src/material/dropdown.dart': Failed assertion: line 481 ...
10
votes
3
answers
9k
views
Flutter: How to set different colors for DropdownItems and for DropdownButton selected item?
I have included DropdownButton in my project but I stucked with these problem.
I have tried to use Theme on it but it also changes the both of colors. I can still change the background color of ...
10
votes
1
answer
22k
views
bootstrap drop down set selected value
I have a Bootstrap drop down list
<button class="btn btn-primary" id="selectButton" data-toggle="dropdown">
Arrangement
<span class="caret"></span>
</button>
<ul class=...
9
votes
2
answers
12k
views
Flutter Change Dropdown arrow color
How to change Dropdown arrow color?
Here is what I want:
This is what I get
My widget:
DropdownButtonHideUnderline (
child: DropdownButton<String>(
...
9
votes
5
answers
12k
views
How to add variation stock status to Woocommerce product variation dropdown
I would like to show the stock status (eg. In Stock / Out of Stock) for each product variation shown in the drop down list of variations on the Woocommerce Product Page. I have copied the relevant ...
9
votes
2
answers
7k
views
How to Implement 3-way Dependent/Chained Dropdown List with Django?
I am using django and postgresql. I'm dealing with a 3-way dependent drop-down list. After adding the country selection, the province area is automatically updated depending on the selected country. ...