fix(v2): navbar, allow unknown attributes (#3140)

This commit is contained in:
Sébastien Lorber 2020-07-28 12:52:01 +02:00 committed by GitHub
parent 33bb9087cf
commit d1a27efe8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,7 +22,10 @@ const DefaultNavbarItemSchema = Joi.object({
activeBaseRegex: Joi.string(),
className: Joi.string(),
'aria-label': Joi.string(),
});
})
// We allow any unknown attributes on the links
// (users may need additional attributes like target, aria-role, data-customAttribute...)
.unknown();
// TODO the dropdown parent item can have no href/to
// should check should not apply to dropdown parent item
// .xor('href', 'to');