PickList onMoveToTarget event

UI Components for React
Post Reply
sonle
Posts: 1
Joined: 26 Jun 2018, 18:19

01 Nov 2018, 17:42

Let's look PickList.js at the line 113 to 123 :

Code: Select all

key: 'onTransfer',
        value: function onTransfer(event) {
            switch (event.direction) {
                case 'toTarget':
                    if (this.props.onMoveToTarget) {
                        this.props.onMoveToTarget({
                            originalEvent: event.originalEvent,
                            value: this.props.selectedItemsSource
                        });
                    }
                    break;
There are something wrong at the line 120 :

Code: Select all

 value: this.props.selectedItemsSource 
It should be assign value from the state.selectedItemsSource instead of props, right ?

I tried to get value from event of onMoveToTarget(event), but it return undefined
I changed the PickList.js with new code, that value assigned from state, event.value look good now.

Maybe I don't have a deep down about props.selectedItemsSource, but the document don't mention it for passing props.

Could anyone fix this one at next version of PrimeReact ?

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

05 Nov 2018, 13:25

Thank you for feedback. We will fix for next release.

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests