Open bjarnef opened 10 years ago
Hey @bjarnef looks like you done all the hard work for me on this. I will make the changes suggested & re-test.
Thanks, Warren
OK this is three quarters done with Min & Max setting a default object rather than nulls if no value for the prevalue is saved (ie initial load of datatype)
Order by is now required with a HTML attribute on the select dropdown.
The Channel and OrderBy prevalues in config should be required (or have a default value in the code for e.g. orderBy = date).
Also see the issue here: http://our.umbraco.org/projects/backoffice-extensions/youtube/issues-help/55146-Breaks-when-no-OrderBy-value-is-chosen
When I added required validation for those two fields I expirienced it validated the fields, but I wasn't able to pick vidoes, because it return these errors:
TypeError: Cannot read property 'enableMin' of null TypeError: Cannot read property 'enableMax' of null
So I checked that minmax field wasn't null and set enableMin and enabledMax as default to false in case minmax is null.
package.manifest:
YouTube.js: