-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
In the table component, the label is assigned as follows.
f.label = f.label || startCase(f.key)
(Permalink to this line in the table component)
But evaluating f.label this way means that the empty string will be falsy and f.key will be used instead.
An empty label is common in actionable columns where a header may not be desirable. It would be reasonable to assume that a user would provide an empty string in this case, but doing so provides a confusing result.
The documentation notes that the label, "Defaults to the field's key (in humanized format) if not provided." But that is deceptive because a standard user would assume providing an empty string is providing a value.
(Link to this section in the documentation)
I suggest modifying this assignment to allow empty string, and making it clear in the documentation that any other falsy value will result in the key being used.