I use Fabric components written in React + Typescript and when using Checkbox component I can add custom attributes such as data-id and so on - this is written also on documentation: https://developer.microsoft.com/en-us/fabric#/components/checkbox
Whats the problem ? I do not know how to add one by passing it to inputProps.
Interface of React HTMLAttribute for field data require string value.
From what I see there interface of React's HTMLAttribute is generic one and Checkbox component passes this interfaces there: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/global.d.ts - They are empty.
Does somebody know how to implement the data- attributes there ?
Thanks. Cheers!
Aucun commentaire:
Enregistrer un commentaire