@@ -144,24 +144,30 @@ class DataTables extends Component {
144
144
< Fragment >
145
145
{ settings . customcss && (
146
146
< style >
147
- { `#dataTable-instances-${ this . props . id } tr.odd {
148
- ${ settings . customcss . oddTableRow . color ? `color: ${ settings . customcss . oddTableRow . color } !important;` : '' }
149
- ${ settings . customcss . oddTableRow [ 'background-color' ] ? `background-color: ${ settings . customcss . oddTableRow [ 'background-color' ] } !important;` : '' }
150
- ${ settings . customcss . oddTableRow . transform ? `transform: rotate( ${ settings . customcss . oddTableRow . transform } deg ) !important;` : '' }
151
- }
152
-
153
- #dataTable-instances-${ this . props . id } tr.even {
154
- ${ settings . customcss . evenTableRow . color ? `color: ${ settings . customcss . evenTableRow . color } !important;` : '' }
155
- ${ settings . customcss . evenTableRow [ 'background-color' ] ? `background-color: ${ settings . customcss . evenTableRow [ 'background-color' ] } !important;` : '' }
156
- ${ settings . customcss . evenTableRow . transform ? `transform: rotate( ${ settings . customcss . evenTableRow . transform } deg ) !important;` : '' }
157
- }
158
-
159
- #dataTable-instances-${ this . props . id } tr td,
160
- #dataTable-instances-${ this . props . id } _wrapper tr th {
161
- ${ settings . customcss . tableCell . color ? `color: ${ settings . customcss . tableCell . color } !important;` : '' }
162
- ${ settings . customcss . tableCell [ 'background-color' ] ? `background-color: ${ settings . customcss . tableCell [ 'background-color' ] } !important;` : '' }
163
- ${ settings . customcss . tableCell . transform ? `transform: rotate( ${ settings . customcss . tableCell . transform } deg ) !important;` : '' }
164
- }` }
147
+ { settings . customcss . oddTableRow && (
148
+ `#dataTable-instances-${ this . props . id } tr.odd {
149
+ ${ settings . customcss . oddTableRow . color ? `color: ${ settings . customcss . oddTableRow . color } !important;` : '' }
150
+ ${ settings . customcss . oddTableRow [ 'background-color' ] ? `background-color: ${ settings . customcss . oddTableRow [ 'background-color' ] } !important;` : '' }
151
+ ${ settings . customcss . oddTableRow . transform ? `transform: rotate( ${ settings . customcss . oddTableRow . transform } deg ) !important;` : '' }
152
+ }`
153
+ ) }
154
+
155
+ { settings . customcss . evenTableRow && (
156
+ `#dataTable-instances-${ this . props . id } tr.even {
157
+ ${ settings . customcss . evenTableRow . color ? `color: ${ settings . customcss . evenTableRow . color } !important;` : '' }
158
+ ${ settings . customcss . evenTableRow [ 'background-color' ] ? `background-color: ${ settings . customcss . evenTableRow [ 'background-color' ] } !important;` : '' }
159
+ ${ settings . customcss . evenTableRow . transform ? `transform: rotate( ${ settings . customcss . evenTableRow . transform } deg ) !important;` : '' }
160
+ }`
161
+ ) }
162
+
163
+ { settings . customcss . tableCell && (
164
+ `#dataTable-instances-${ this . props . id } tr td,
165
+ #dataTable-instances-${ this . props . id } _wrapper tr th {
166
+ ${ settings . customcss . tableCell . color ? `color: ${ settings . customcss . tableCell . color } !important;` : '' }
167
+ ${ settings . customcss . tableCell [ 'background-color' ] ? `background-color: ${ settings . customcss . tableCell [ 'background-color' ] } !important;` : '' }
168
+ ${ settings . customcss . tableCell . transform ? `transform: rotate( ${ settings . customcss . tableCell . transform } deg ) !important;` : '' }
169
+ }`
170
+ ) }
165
171
</ style >
166
172
) }
167
173
0 commit comments