You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When <FormTokenField/> is used as a dropdown selector, it's natural to collapse the suggestions and hide the input field when a token is selected (like the <select> behavior).
By the way, closing the form is also a good way to inform users that the maximum number of tokens is selected.
What is your proposed solution?
We have two options:
Create another prop to control this behavior, something like __experimentalCollapseOnMaxLenghtReach.
Or, set this as the default behavior, when maxLength is set. (This may be not realistic because it changes the behavior of the component which many sites are depending on that).
dinhtungdu
changed the title
[FormTokenField] Close the form when number of token reach maxLength
[FormTokenField] Close the form when the number of tokens reach maxLengthJul 29, 2022
What problem does this address?
When
<FormTokenField/>
is used as a dropdown selector, it's natural to collapse the suggestions and hide the input field when a token is selected (like the<select>
behavior).By the way, closing the form is also a good way to inform users that the maximum number of tokens is selected.
What is your proposed solution?
We have two options:
__experimentalCollapseOnMaxLenghtReach
.maxLength
is set. (This may be not realistic because it changes the behavior of the component which many sites are depending on that).Additional information:
This is suggested by @Aljullu on woocommerce/woocommerce-blocks#6647 (review)
The text was updated successfully, but these errors were encountered: