- Home
- Forum
- Angular - EJ 2
- Changing what replaces the placeholder when selections are made
Changing what replaces the placeholder when selections are made
Hello,
I am using the multiselect dropdown in checkbox mode with select all.
How can I dynamically clear the selected choices from the top box of the dropdown? I can reset the checkboxes dynamically but the text in that box doesn't clear.
Also, what is shown changes format seemingly randomly- sometimes showing the total count selected and sometimes showing the names of what was selected- is there a methodology behind that?
If you do take the time to provide a sample, I would greatly appreciate it if you'd use Stackblitz as I do not use VS code.
Thanks,
ER
SIGN IN To post a reply.
3 Replies
PO
Prince Oliver
Syncfusion Team
June 27, 2019 12:08 PM UTC
Hello Elise,
Thank you for contacting us.
Query 1: How can I dynamically clear the selected choices from the top box of the dropdown? I can reset the checkboxes dynamically but the text in that box doesn't clear.
You can dynamically clear the selected values by passing false in the selectAll method. Kindly refer to the following code.
|
public onclick = () => {
this.mulObj.selectAll(false);
} |
Query 2: Also, what is shown changes format seemingly randomly- sometimes showing the total count selected and sometimes showing the names of what was selected- is there a methodology behind that?
If the selected content fits inside the input box, the dropdowns display the selected items directly. If the width of the selected items exceeds the input box, then the items that does not fit are displayed with “+ X more” template. This is the control’s behavior.
Let us know if you need any further assistance on this.
Regards,
Prince
ER
Elise Rothberg
June 28, 2019 10:32 PM UTC
Thank you for the reply and the stackblitz.
When using selectAll(false), there is a lag of about 1-2 seconds when the text in the box is visible and then it clears - is there a way to not have the text show up in the text box at all?
PO
Prince Oliver
Syncfusion Team
July 1, 2019 09:58 AM UTC
Hello Elise,
Thank you for your update.
We checked the reported issue in our end. Unfortunately, we could not replicate any lag in our end. The control works fine. Kindly share us more information on the issue with screenshot or video demonstrating the issue. This will help us provide a prompt solution.
You can also clear the values by setting value property as null. Kindly refer to the following code.
|
public onclick = () => {
this.mulObj.value = null;
} |
Regards,
Prince
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
ER Elise Rothberg
- Jun 26, 2019 09:51 PM UTC
- Jul 1, 2019 09:58 AM UTC