-
Notifications
You must be signed in to change notification settings - Fork 934
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
enableNestedDataAccess option to disable nested data when needed #909 #1181
Conversation
Hello @domind. Can you explain the use case for shutting off this functionality via an option? It was my thinking that one would simply not use the dot notation if he/she did not want to use nested data. |
Hi @gabrielliwerant you proposed to add this as an option
Right now, by default nested data are enabled, so if there is a dot in name data are not displayed. |
@domind Ok, thanks for reminding me. So, another way to do this would be to allow an option for choosing which character to use as a separator for objects. The advantage of this approach would be that there would be a way for someone to use this feature even if there are dots in the names, instead of having to choose between enabling/disabling the feature, What do you think? |
Sounds reasonable. Should we still keep name "enableNestedDataAccess" in such case? Guess default will be enabled with dot as separator, but should we allow to disable it completely? |
…d data can use any separator, default value if this option is omitted is '.' Passing empty string disables nested data access.
@gabrielliwerant - arranged following:
|
Thank you for putting this together! I've gone ahead and merged this into v3 and added some documentation in the README. This feature was previously mentioned only in one example, and that was for something else and wasn't even linked on the README page. So it was kind of a hidden feature. I actually think having it on by default is bad since it leads to confusing bugs as seen in #909. I think I'm going to set it to be off by default in v3. It's a breaking change, but I'll have it documented in the write-up for v2 to v3. |
also added 2 tests for option
enableNestedDataAccess : false
:enableNestedDataAccess : true