Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeSelect corrupts original data #2459

Closed
plandem opened this issue Jul 21, 2016 · 2 comments
Closed

TreeSelect corrupts original data #2459

plandem opened this issue Jul 21, 2016 · 2 comments

Comments

@plandem
Copy link
Contributor

plandem commented Jul 21, 2016

I don't know why, but i'm losing my data after render of TreeSelect. Here is usage:

            <Form.Item>
              <TreeSelect className={`${prefixCls}-value-input`}
                          dropdownClassName={`${prefixCls}-value-dropdown`}
                          showSearch
                          treeLine
                          value={id}
                          treeData={tree}
              treeDataSimpleMode={{id:'id', pId:'parent_id', rootPId:null}}
                          dropdownMatchSelectWidth={false}
                          filterTreeNode={filterTreeNode}
                          showCheckedStrategy={TreeSelect.SHOW_ALL}
                          searchPlaceholder={searchPlaceholder || formatMessage(messages.searchPlaceholder)}
                          placeholder={valuePlaceholder || formatMessage(messages.valuePlaceholder)}
                          onChange={(id) => this.handleChanges({ id })}/>
            </Form.Item>

If i'm using it like this, then my tree array will be cleared. But if i'm using like this:

                          treeData={tree.concat()}

Then everything is ok. I'm sure it's not correct behaviour.

@plandem plandem changed the title TreeSelect corrupt original data TreeSelect corrupts original data Jul 21, 2016
warmhug added a commit that referenced this issue Jul 23, 2016
@warmhug
Copy link
Contributor

warmhug commented Jul 23, 2016

try rc-tree-select@1.7.9

afc163 pushed a commit that referenced this issue Jul 24, 2016
Conflicts:
	package.json
@afc163 afc163 closed this as completed Jul 24, 2016
@lock
Copy link

lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants