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

Ajax loading #78

Open
yudiznilay opened this issue Mar 10, 2021 · 3 comments
Open

Ajax loading #78

yudiznilay opened this issue Mar 10, 2021 · 3 comments

Comments

@yudiznilay
Copy link

Scenario
In a page there is select defined with this code

<select>
   <option hidden selected>Choose Option</option>
</select>
<a href="redirect.php">Go to this page</a>
var customSelect = $('select');
// Options for custom Select
jcf.setOptions('Select', {
    wrapNative: false,
    wrapNativeOnMobile: false,
    fakeDropInBody: true
});
jcf.replace(customSelect);
jcf.refresh();

Other options are loaded via ajax. Next to select there is link which redirects to new page

Issue
After selecting a value loaded via ajax and click on the link the page redirects and coming back from that page via browser back button, select doesn't show Choose Option value in the dropdown. Only the JCF tags are generated.

@yazonnile
Copy link
Collaborator

Does your code work without jcf?
I mean, does native select works fine on back button?

@yudiznilay
Copy link
Author

Yes

@yazonnile
Copy link
Collaborator

Try to refresh jcf then.
Its hard to fix the issue without seeing this issue in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants