Closed KINKCreative closed 5 years ago
@KINKCreative which version of tagfield are you using? And are you using this in a page?
I ask because there's a couple of factors that might cause this error right now:
Having only had a very quick glance at your stack trace, it looks like a PropTypes library incompatibility. If you're keen to update it, it's a very straightforward process to replace the native library with the extra package and we'd welcome a pull request to do so if you're up for it.
I am having this issue with SS4.3 as well, if you start on a page that doesn't have a tagfield, then navigate to a page that has a tag field, the tag field will not load. This is happening with 2.2.1.
@Kethatril thanks for the report. I think the issue here is that the JS and CSS bundles are not available when you navigate to a page that is generated with PJAX- such as loading a page without a tagfield then loading a page that does. If you load the second page directly then the PHP form field's requirements calls are run and get added correctly, but in the first page's case they don't get loaded in time.
We can try to avoid this issue by adding them as "extra JS" and CSS configuration on the LeftAndMain class. Here's an example:
Would you like to give that a try?
Yeah, I've got it working with that already, still having some other issues though. When you search for a tag the spinner in the dropdown doesn't stop spinning, or show any results until you unfocus the field and re-search. This seems to happen when lazy is true. Not sure if I should report it here or wherever the dropdown component comes from.
@Kethatril I think repository is the right place, but in a separate issue
I added a TagField normally to a SS4.4.x install. When visiting such post in the admin, I get a JS error and the field is just a blank.
Code:
Result: https://www.dropbox.com/s/npu4r7qowbtb3xs/Screenshot%202018-12-06%2016.03.45.png?dl=0
JS errors: