Skip to content

Update tree key value to 'select-tree-key' in SelectTree class #159

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

Merged
merged 1 commit into from
May 24, 2025

Conversation

CodeWithDennis
Copy link
Owner

@CodeWithDennis CodeWithDennis commented May 24, 2025

This pull request updates the setUp method in the SelectTree component to use a consistent and descriptive key for the tree instead of a randomly generated one.

Key update:

  • src/SelectTree.php: Replaced the dynamic treeKey value ('treeKey-' . rand()) with a static and more descriptive key ('select-tree-key') in the setUp method. This ensures consistency and predictability in the tree key assignment.

This should fix the field flickering

@CodeWithDennis CodeWithDennis merged commit 622287f into 3.x May 24, 2025
2 checks passed
@CodeWithDennis CodeWithDennis deleted the remove-rand-from-tree-key branch May 24, 2025 15:42
@buzkall
Copy link
Contributor

buzkall commented May 29, 2025

This change breaks the option to change the relationship query with $modifyQueryUsing using a $get variable

In v 3.1.54 this code updates the options in the selectTree when the select 'module' is updated and has live() enabled

->relationship(
    'category',
    'name',
    'parent_code',
    fn($query, Get $get) => $query->when($get('module'), fn($query) => $query->module($get('module'))),
)

in v 3.1.55 the options aren't updated

@CodeWithDennis
Copy link
Owner Author

@buzkall Thanks for reporting! I have reverted this change.

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.

2 participants