Open harishlyadav opened 6 years ago
How about having radio button for single selection?? that will make more sense.
was this ever done? I am using this control and would to have radio button instead of chkbox when the mode is single select. Also for idField, how can I bind the whole object instead of just the id value?
Great control, thanks very much. I have the same request from my users, either radio buttons or nothing at all. Any news on this?
@garthmountain @tinuverma I agree radio button makes more sense in case of single selection. soon it will be done.
was this ever done? I am using this control and would to have radio button instead of chkbox when the mode is single select. Also for idField, how can I bind the whole object instead of just the id value?
Please refer example code.
<ng-multiselect-dropdown name="country" [placeholder]="'Select City'" [data]="countries" [(ngModel)]="selCountries" [settings]="dropdownSettings" class="singleselect"
this.dropdownSettings = { singleSelection: true, idField: "item_id", textField: "item_text", allowSearchFilter: true };
.singleselect .multiselect-item-checkbox { padding: 0px !important; } .singleselect input[type=checkbox]+div:before { display: none; }
.singleselect input[type=checkbox]+div:after { display: none; }
.singleselect input[type=checkbox]+div { padding: 6px 10px !important; }
.singleselect input[type=checkbox]:checked+div { background-color: #337ab7 !important; color: #fff !important; }
Not working this code
::ng-deep .dropdown-list ul li.multiselect-item-checkbox div:before { display: none; } ::ng-deep .dropdown-list ul li.multiselect-item-checkbox div:after { display: none; } ::ng-deep .dropdown-list ul li.multiselect-item-checkbox div { padding-left: 0 !important; }
Hello Buddy,
I have requirement from my client, that while single selection please hide the checkboxes. so can you please help me to that. Thanks, Harish