From 77e5b11d34cac1bfbe1a891c22ff3b79dc9000c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fatay=20=C3=87ivici?= Date: Thu, 21 Sep 2017 10:35:49 +0300 Subject: [PATCH] Realign panel after filtering --- src/components/dropdown/Dropdown.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/dropdown/Dropdown.js b/src/components/dropdown/Dropdown.js index 3d6e2d76bd..8340d8b493 100644 --- a/src/components/dropdown/Dropdown.js +++ b/src/components/dropdown/Dropdown.js @@ -374,7 +374,7 @@ export class Dropdown extends Component { }); } - items = items && this.props.options.map((option, index) => { + items = items && items.map((option, index) => { return ; }); @@ -424,6 +424,12 @@ export class Dropdown extends Component { this.container.appendChild(this.panel); } } + + componentDidUpdate(prevProps, prevState) { + if(this.props.filter) { + this.alignPanel(); + } + } render() { let className = classNames('ui-dropdown ui-widget ui-state-default ui-corner-all ui-helper-clearfix', this.props.className, {'ui-state-disabled': this.props.disabled});