Skip to content

Add lookup addCondition issue to demo#1556

Closed
mhuser wants to merge 6 commits intoatk4:developfrom
mhuser:lookup_addCondition
Closed

Add lookup addCondition issue to demo#1556
mhuser wants to merge 6 commits intoatk4:developfrom
mhuser:lookup_addCondition

Conversation

@mhuser
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

mvorisek commented Dec 3, 2020

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

@ibelar
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

3 participants