Closed buzkall closed 9 months ago
Done!
Done!
@buzkall Some conflicts!
Fixed
This is breaking every page that uses the SelectTree;
Maximum execution time of 30 seconds exceeded
I'm using it in my local installation and works. I don't know how to replicate the problem you're facing :(
"codewithdennis/filament-select-tree": "dev-with-key",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/buzkall/filament-select-tree"
}
],
@buzkall Try to make an example repo with the "normal" way of using the field and you probably will get the same issue.
I've seen what you meant. I've modified the getCustomKey function to work in both situations
In order to specify a different key than the model's one to be the parent key, you can use the ->withKey('name') method.
For example: you have id, code and parent_code in your model. Your model uses id as key, but the parent-child relation is established between code and parent_code In order to make SelectTree work with this model, you need to call the function ->withKey('code')
This PR fixes the problem introduced by https://github.com/CodeWithDennis/filament-select-tree/pull/70 and keeps using the ->getKey() function from the model if no custom key is specified