mardi 30 octobre 2018

Office UI Fabric, Checkbox component, override default ID

How can I override the default ID for Checkbox component from Office UI Fabric package, I tried passing it as a prop to <Checkbox /> but it still renders with default ID which goes something like checkbox-XX where XX represents random integer number.

Here is how it currently looks:

<Checkbox label={obj.Title} onChange={(e) => this.handleOnChange(e as React.FormEvent<HTMLInputElement>)} className="checkbox-email-recipient unchecked" id={obj.Title} />

Note that I tried using Title as the ID for Checkbox.

How can I override this default ID ?




Aucun commentaire:

Enregistrer un commentaire