Skip to content

Conversation

@lotestudio
Copy link
Contributor

Refactor prepend and getCustomKey methods.
Extend getState method from hasState trait.

The idea is to convert all values for treejs to strings.
I think this is a better solution than editing the index.js.

So, no matter what the key and parent key are (integer id, string uid, string code), they will always be converted to a string, and treejs will correctly find the selected items regardless of where they come from (session, db, url query string).

@CodeWithDennis
Copy link
Owner

I will test it somewhere this week, don't have a demo project ready at the moment.

@CodeWithDennis CodeWithDennis merged commit 5e2178a into CodeWithDennis:3.x Apr 4, 2025
1 check passed
@arshaplus
Copy link

Please don't commit without test! :) This change had shut down our panel and empty select tree field in forms was returning filled array 🤦‍♂️

@CodeWithDennis
Copy link
Owner

Please don't commit without test! :) This change had shut down our panel and empty select tree field in forms was returning filled array 🤦‍♂️

PR is already reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants