Opened 9 years ago

Closed 5 years ago

#11012 closed enhancement (duplicate)

Select: add API to remove all options

Reported by: Pete Smith Owned by:
Priority: low Milestone: future
Component: Dijit - Form Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

I wanted a way to simply do (in regular dom js)

select.options.length = null;

I tried:

dijit.byId('myselect').removeOption();

expecting a blank nodeIndex to remove all. The only way I could get it to remove all options was:

dijit.byId('myselect').removeOption(dijit.byId('myselect').getOptions());

Change History (6)

comment:1 Changed 9 years ago by bill

Milestone: tbdfuture
Summary: dijit.form.Select.removeOption() doesn't remove all options.Select: add API to remove all options
Type: defectenhancement

comment:2 Changed 9 years ago by Douglas Hays

Owner: set to Douglas Hays

comment:3 Changed 8 years ago by bill

Component: DijitDijit - Form

comment:4 Changed 6 years ago by Douglas Hays

Owner: Douglas Hays deleted
Status: newassigned

comment:5 Changed 6 years ago by Douglas Hays

Status: assignedopen

comment:6 Changed 5 years ago by bill

Resolution: duplicate
Status: openclosed

Duplicate of #17803.
Although this ticket came first, I'll track the enhancement in #17803.

Note: See TracTickets for help on using tickets.