platform icon indicating copy to clipboard operation
platform copied to clipboard

Listener does not work on a Screen with query loaded class variables

Open rajabilal555 opened this issue 2 years ago • 0 comments

Describe the bug If you have a class variable which is loaded by the query function in the Screen (image for reference) and If you are using this variable in the layout. The Listener's async call will fail... image

To Reproduce Steps to reproduce the behavior:

  1. Follow the quickstart to make a post crud (https://orchid.software/en/docs/quickstart-crud/)
  2. Use the $this->post in the layout (e.g. ->canSee($this->post->status == "approved"))
  3. Add a listener to the page (e.g. A Country, State, City selector)

Expected behavior The Listener should work properly...

Screenshots image

Desktop:

  • OS: PopOS
  • Browser: Chrome
  • Version [e.g. 22]

Server:

  • Platform Version: ^13.7
  • Laravel Version: ^9.19
  • PHP Version: 8
  • Database: MySQL

I noticed someone had a problem with multiple listeners as well, maybe we need a rework of the Listener Layout...

Can someone point me to an alternate solution I can do for a Country, State, City selector with the Relation input that updates the options for States when selecting country and so on...

rajabilal555 avatar Nov 12 '22 12:11 rajabilal555