CuppaLabs / angular2-multiselect-dropdown

Angular 2 Dropdown Multiselect
https://cuppalabs.github.io/angular2-multiselect-dropdown
MIT License
298 stars 256 forks source link

Allow to change the message when there is no data #43

Closed ocridlig closed 6 years ago

ocridlig commented 7 years ago

I need to translate component messages. But the message "No Data Available" seems to be hard coded.

Is it possible to add a setting for this message?

Thanks.

JigSawFr commented 7 years ago

See textsetting on http://cuppalabs.github.io/components/multiselectDropdown/

ocridlig commented 7 years ago

Not the same message.

The message I'm talking about appears when the list is empty.

CuppaLabs commented 7 years ago

@ocridlig You are right. Will add it in next release.

Mridul16 commented 7 years ago

Even I need this. Please help add it in the next build ASAP

KevinCarnaille commented 6 years ago

It could be a good idea yes, any change about this request ?

gray0072 commented 6 years ago

Please try noDataLabel property. dropdownSettings = { ...other settings noDataLabel: 'No data available. It seems you have no access rights' }; I've found it here https://github.com/CuppaLabs/angular2-multiselect-dropdown/blob/88aaa027c6f63763871cad91aaf6eb3946b6fd49/src/app/angular2-multiselect-dropdown/multiselect.component.ts#L100

CuppaLabs commented 6 years ago

Please refer to settings configuration in the documentation. All labels are configurable.

RoshiniLamba commented 4 years ago

noDataLabel can be done only if the data isn't available . What if the dropdown takes time to load the data ? i want to show "loading" instead of a hard-coded "no Data Available". how do i change the text ?

PankajMSharma commented 2 years ago

@RoshiniLamba You would have to change the whole object of settings. This is because while change detection angular only check the reference of the object. Reference changes for setting only when we assign a new object to settings. Eg. settings = {...settings, noDataLabel: 'Loading..'}