-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
@wordpress/components referencing old version of FormTokenField #21568
Comments
cc @aduth |
@sgrund14 Can you include some more detail about your development environment, and specifically which build tools you're using which would convert "import from |
sure! I'm using |
Thanks. Following-up on my comment from #14819 (comment), while you're likely not explicitly referencing the globals, my understanding of how Could you share a couple more details:
|
of course! it's WP v5.2.4 and it goes
running from a custom plugin |
By chance, are you able to upgrade the site to the latest version of WordPress to test if it's still a problem? I am about 80% certain the issue is that the built version of the code is referencing the |
ohhhhh that did it. classic. do you know what version those changes went out with? the site i'm working with is using 5.3.2, and i'm not sure if we can upgrade right now or not. |
@sgrund14 It's difficult to say with certainty, but given the release schedule of WordPress 5.3, I think it'd be fair to assume it landed with WordPress 5.3.0. There may still be options to continue using an older version of WordPress while still using the latest version of the code. However, it can become risky, since it usually involves having multiple versions of the same package loaded in the editor (the version shipped with your version of WordPress, and the more recent NPM versions). I've not personally done this before, so I can't advise on the specifics, but I imagine it could be one or the other of:
Since the original issue appears to have been identified, I'm going to close the issue since there's not any actionable steps to be taken from Gutenberg itself. |
thanks much, @aduth. this has been enlightening. |
Describe the bug
A clear and concise description of what the bug is.
I'm trying to build a wrapper around the
FormTokenField
which asynchronously fetches a suggestion list from a graphql server and populated the dropdown with the fetched terms, and so am using it like this in my custom componentThe problem is, I'm seeing the behavior fixed in this PR #14819
which was merged + published last year. That is, I type in the input, the suggestion list is fetched, but it is not rendered until I trigger another input change. What's strange is that if I copy over the code from node_modules for
FormTokenField
, the dropdown behaves as expected from the previous fix. I'm not sure why there would be a discrepancy between what I import from@wordpress/components
(@^9.3.0) and the node_modules code for that very same component?To reproduce
Steps to reproduce the behavior:
Outlined above ^
Expected behavior
A clear and concise description of what you expected to happen.
The node_modules version of
FormTokenField
to run the same code as the imported versionScreenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
I'm using
yarn@1.17.3
for package management and@wordpress/scripts@^7.2.0
for the build script (wp-scripts build
)The text was updated successfully, but these errors were encountered: