this._options = Core.extend({
callbackPrepareItem: undefined,
- enableVisibilityFilter: true
+ enableVisibilityFilter: true,
+ filterPosition: 'bottom'
}, options);
+ if (this._options.filterPosition !== 'top') {
+ this._options.filterPosition = 'bottom';
+ }
+
var element = elById(elementId);
if (element === null) {
throw new Error("Expected a valid element id, '" + elementId + "' does not match anything.");
inputAddon.appendChild(visibilityButton);
}
- container.appendChild(inputAddon);
+ if (this._options.filterPosition === 'bottom') {
+ container.appendChild(inputAddon);
+ }
+ else {
+ container.insertBefore(inputAddon, element);
+ }
this._container = container;
this._dropdown = null;