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

Load initial options by default #24

Open
AkselMeola opened this issue Jan 7, 2025 · 0 comments
Open

Load initial options by default #24

AkselMeola opened this issue Jan 7, 2025 · 0 comments

Comments

@AkselMeola
Copy link

It would be very useful if the initial options in responsive mode could be loaded without specifying a non-empty default value.

At the moment the initial Ajax call is only done if there's a value. But in case there is no sensible default and the initial options depend on some other field/parent then nothing is loaded.

I think there should be an option to load initial options either using parent field value or by providing the initial query parameters to the field.

As of now:

// FormField.vue

// If field is responsive, do we have any initial values
if (this.field.value) {
    return this.loadInitialOptions(this.field.value);
}
AkselMeola pushed a commit to AkselMeola/nova-ajax-field that referenced this issue Jan 7, 2025
When `loadInitialOptionsWithValue` is provided then the initial options ajax call is done using the given value.
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

1 participant