Skip to content

Instantly share code, notes, and snippets.

View adrianbunea's full-sized avatar
🤌
Mamma mia!

Adrian Bunea adrianbunea

🤌
Mamma mia!
View GitHub Profile
@MikaelCarpenter
MikaelCarpenter / react-select-data-attributes.jsx
Created December 14, 2018 19:09
Solution for adding data attributes to a react-select component by passing in "custom components" where you've manipulated the innerProps prop
import React, { Component } from 'react';
import ReactSelect, { components } from 'react-select';
const TextOption = props => (
components.Option && (
<components.Option { ...props }>
...
</components.Option>
)
);