Select option data flickering in laravel livewire page - laravel-livewire

In my page, I am using polling to refresh current status of an event.
In the same page, I have one dropdown(select). When I click the dropdown, the data inside it like flickering. SO, I think it is related to polling request.
I tried using wire:ignore.self and wire:model.defer but the issue still there.

Since the wire polling is updating DOM, try adding wire:ignore (and not wire:ignore.self) on <select> tag.

Related

How to detect a page refresh using javascript on APEX?

My goal is to do some javascript action the moment the user clicks the browser's refresh button.
I've tried:
Function and Global Variable Declaration
function pageunload(){
alert('here');
};
Execute when Page Loads
window.addEventListener('beforeunload', pageunload);
I know that the 'addEventListener' is working properly but the event is not the right one.
I have also tried to dynamic action "before Refresh", but I haven't been able to associate it to the page level, only items/regions etc.
In the page attribute you can write Javascript on Page Load which will be executed when the page is reloaded or submitted.
beforeunload is the opposite of what you want
Use the load event
Check Mohamad image
Create a dynamic action for page Load

Apex Oracle : How to refresh Page Item?

I have a page Item on Apex 19.2
In page validation where i'm setting the value of the item : P1_MyItem. The value is set properly in session state. However it's not reflected immedialy in the html item. I still need to reload the page to get the right value in the item.
Is there any way to reflect it immediatly please ? (without reloading the page)
Thanks.
Cheers,
You need to ensure Items to Return lists any item that is updated within the PL/SQL, that you would also like updated within the web page once the dynamic action is completed.
As opposed to 'Items to Submit', which sends any information in pages items the browser is aware of to the database, before execution of the PL/SQL block.
Page processing now defaults to using Ajax. So, if a validation error occurs, the page is no longer re-rendered by default because the assumption is that validations will not change session state. If you want to see your changes, you'll need to locate the page property named Reload on Submit and set that to Always.
But, of course, that means the page will be re-rendered/re-loaded which is what you're trying to avoid.
Also, it's not possible to set the page property to Reload on Submit if you want to use an Interactive Grid on the same page. It requires the option Only for Success, so you have to refresh the page item somehow else.

Oracle APEX form on table, don't reset table pagination after changing values through the form

I have a form on top of a report, and when the user updates values in the report, the form pops up, they make edits, and then click "Apply Changes". There are many rows in the report and right now I have pagination set per every 15 pages. The report is set to enable partial refreshes so the data updates right after the user clicks "Apply Changes". However, if I am on any page other than the first page of the report, it resets the pagination and brings me back to the first page. Is there a way to update the report but stay on the page I'm making the edit for? That way the user can immediately see the change they made through the form.
I was able to solve the issue by using a Dialog Closed dynamic action executing the following javascript:
window.location.reload(false);
It refreshes the browser after the user makes edits, and the pagination does not reset. This is a workaround because the Refresh dynamic action resets pagination. Again this is in APEX 5.1.3.
Which Apex version do you use? I've just tried it on apex.oracle.com which runs Apex 20 and - no problem at all. Once I edit some value in a form, branch returns me to interactive report, to exactly the same page which I left.
Check branch's Behavior - it is set to redirect to page or URL, target is page where the interactive report is; check other properties for the target. Its action should be set to "None" (offered are: clear regions, reset regions, reset pagination which might be set in your branch properties).

how can i keep values after hitting submit

I have a Submit Page button on my Apex page. If I click on it, it sets the values, sends the form and refresh my page.
Is it possible to keep field values, or repopulate them somehow after page refresh?
Thanks in advance
Yes, this is default behaviour unless something has been done to remove the session state data. Check your page processes for something that 'resets cache'.
Also check the branch to ensure it's not clearing cache for the page you're re-opening.
Also check the source of the items. Is it using source definition "Always", or "Only when session state is null". What's the source?

PATCH with ember-data

With ember-data 1.0, is there any way to wrap up a set of changes to a record and only apply those changes once they've successfully hit the server?
My use case is a simple one - there's an 'edit' modal for a Post that's triggered by an 'edit' button. I'm trying to find a way to emulate a traditional form that only updates the Post's attributes when a 'save' button is clicked and the server confirms the patch.
I can use one-way bindings in my TextFields in the modal, but that still doesn't solve the problem of delivering those changed attributes to the server without storing them in the record first.
Is there a way to duplicate a record and use it to persist the changes before throwing it away?
Duplication doesn't exist yet, there is talk of it.
Technically the values aren't persisted on the record yet, they are stored on a _attributes hash. On any non-save step (cancel, exiting the route w/o save) you can rollback the record.