Make allowEmpty work with text
type
#7721
Replies: 10 comments 1 reply
-
Hi @wesleywong the option works only if a cell has a validator. Text cell type doesn't have one. You would need to add additional logic that checks if a cell is empty. |
Beta Was this translation helpful? Give feedback.
-
Hi, I've come across the same issue with cell types that do have default validators. It seems that most of the default validators are not checking whether I understand we can add our own custom validators, but it doesn't make sense for some of the defaults to ignore this setting and some to follow it. Perhaps they could all perform the following check before doing any further validation:
Please let me know what you think. I can post a separate issue if needed. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi @koolmoo we decided that in default an empty string should be valid for all cell types. That is why the |
Beta Was this translation helpful? Give feedback.
-
Hi @AMBudnik I'm not sure I understand fully. Currently, the allowEmpty flag defaults to true, which means by default empty values are valid for all cell types. What I am wondering is why setting it to false does not have a consistent behavior between the cell types. It works on numeric and date/time cells but not on normal or dropdown/autocomplete cells. Also, in the documentation for allowEmpty it states:
I understand if it's not a high priority, but I do believe either the behavior should be made consistent, or the documentation should be updated to accurately reflect the behavior. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Hi @koolmoo sorry I did not write it clearly as well. The dropdown cell type corresponds to http://jsfiddle.net/vbmw6vgj/ |
Beta Was this translation helpful? Give feedback.
-
I ran into this and was a bit confused as well. I think @koolmoo makes a good point, even though |
Beta Was this translation helpful? Give feedback.
-
Agree @aaronbeall opened the issue and changed a title |
Beta Was this translation helpful? Give feedback.
-
Hi @wesleywong, @koolmoo, @aaronbeall, Psst, don't forget to see #7694 and leave your's welcome 👋 to Handsontable Discussions! 😉 |
Beta Was this translation helpful? Give feedback.
-
Any update on this? When set |
Beta Was this translation helpful? Give feedback.
-
Hi @KiddoV We have reported it internally, but how this will be solved is unclear. The documentation has an error and should mention that the |
Beta Was this translation helpful? Give feedback.
-
allowEmpty: false
No problem in "dropdown", library will prevent value to be empty but this doesn't work in "text". Please advise.
Version: 1.14.1
Beta Was this translation helpful? Give feedback.
All reactions