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

Add lookup addCondition issue to demo #1556

Closed
wants to merge 6 commits into from
Closed

Add lookup addCondition issue to demo #1556

wants to merge 6 commits into from

Conversation

mhuser
Copy link
Contributor

@mhuser mhuser commented Dec 3, 2020

NOT TO BE MERGED

In atk4/ui 2.2.x it is possible to addCondition() to a form control lookup->model.
In atk4/develop it is still possible to addCondition() at initialization of the lookup, but not after. This PR add a segment to lookup-dep demo to show both at init or after addCondition behaviour on lookup.

@mvorisek
Copy link
Member

mvorisek commented Dec 3, 2020

@georgehristov do we duplicate somewhere the model without cloning it, so the conditions are unset? That is what I think is the issue.

@mhuser
Copy link
Contributor Author

mhuser commented Dec 3, 2020

@mvorisek , @georgehristov seems adding this to renderView() fix the behaviour:

    $this->callback = \atk4\ui\Callback::addTo($this);
    $this->callback->set([$this, 'outputApiResponse']);

Not sure what it is doing.
These lines have been moved to init()

@mvorisek
Copy link
Member

mvorisek commented Dec 3, 2020

@ibelar I think you want the one who moved this part, please check

@ibelar
Copy link
Contributor

ibelar commented Dec 4, 2020

@ibelar I think you want the one who moved this part, please check

@mvorisek - Yes - It was moved to fix #1462

@mvorisek
Copy link
Member

mvorisek commented Dec 4, 2020

@ibelar I think you want the one who moved this part, please check

@mvorisek - Yes - It was moved to fix #1462

but for some reasons no PR is linked there...

ibelar added a commit that referenced this pull request Dec 4, 2020
@ibelar
Copy link
Contributor

ibelar commented Dec 4, 2020

Close because replace by #1558

@ibelar ibelar closed this Dec 4, 2020
DarkSide666 pushed a commit that referenced this pull request Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants