Questions tagged [react-data-table-component]
126 questions
0
votes
2 answers
ReactJS: add/update an array of objects with hooks
To the React gods down here, I'd like to know if my code can be improved.
The goal is to add/update an array of objects nested in an object.
Here is the main object:
const initialProductData = {
_id: "",
name: "",
…

PYG
- 347
- 1
- 2
- 8
0
votes
1 answer
Width:"fit-content" is not working in react-data-table-component
I am using the react-data-table-component library to build tables. One of my tables has a very long title and I would like to wrap it. I tried multiple CSS properties in my browser console and figured width:"fit-content" is yielding the result I…

Anil Dharni
- 41
- 9
0
votes
1 answer
The component styled.div with the id of "" has been created dynamically
I am using react-data-table component with server side pagination filtering and ordering, everything is working just fine, but I am getting these warning that I can't understand how to solve, I looked for a solution but I only found answers about…

sarah rara
- 1
- 1
0
votes
2 answers
Passing row specific data to expandableRowsComponent
I have created a Table using react-data-table-component and now I would like to make the table rows expandable such that when I expand a row it displays details specific to that row something exactly like Material-UI Collapsible.
I read the…

Alex
- 180
- 1
- 10
0
votes
1 answer
Define striped color in react-data-table-component
I have a 'react-data-table-component' and I want to basically make a dark theme. I have managed to change the background color but I also want my striped background color to be dark as well.
Here is the code:
createTheme('solarized', {
text: {
…

MomasVII
- 4,641
- 5
- 35
- 52
0
votes
1 answer
Reactjs Datatable Change Text
I'm using react-data-table-component.
https://www.npmjs.com/package/react-data-table-component
There is a structure that works completely with or without data in the table. However, my question is in the text shown by default when there is no…

okan Acer
- 61
- 1
- 9
0
votes
3 answers
React data table component. How to dynamically select rows
I have a DataTable with the following columns:
const columns = [
{ name: "Matric",
selector: "matric",
sortable: true
},
{
name: "Forename",
selector: "forename",
sortable: true
},
…

gannothor
- 9
- 1
- 3
0
votes
1 answer
can we use two selectors under one column in react data-table component?
I am using react data-table component and I want to display 2 fields under one header. But the issue is that I don't know the correct method to use react-data-table-component and the instruction of react-data-table-component do not include such…

Diksha
- 1
- 1
- 1
0
votes
1 answer
0
votes
1 answer
How to make automation increment number column in datatable using typescript react?
I'm trying to do something simple: display the row number on a primereact / components / datatable / DataTable column.
Problem is that the only way it seems possible is by adding a data field with indexes, which get scrambled if sorting is turned…

grudev
- 485
- 1
- 6
- 15
0
votes
1 answer
How to add an object to another object in array in javascript
import React from 'react';
import ReactExport from 'react-data-export';
const ExcelFile = ReactExport.ExcelFile;
const ExcelSheet = ReactExport.ExcelFile.ExcelSheet;
ExcelData = [{
columns:
[
[{ title: "Header1"…

Anvesh
- 97
- 2
- 11
0
votes
1 answer
React - How to add onclick function to buttons in each row in Datatables
I'm trying to add: edit and delete buttons to each row in my datatable, but clicking the buttons don't execute the functions declared in the "onclick"
$(schedTableID).DataTable({
data: schedData.data,
order: [[0, "asc"]],
columns:…

amiellion
- 101
- 3
- 9
0
votes
1 answer
how to trigger function from outside in the class react
here is my column definition for the react data table. in the last column, I'm trying to trigger btnClickedHandler function from outside the class. but now it's throwing error like this -> [TypeError: undefined has no properties].
that means this…

Ranushka kalhara
- 63
- 1
- 10
0
votes
1 answer
React Js Handling event button on a column to get row using onClick
Hi i am a new learner who was trying to find how to use oclick on button in react data table, below are my code for, in the last row i add a button to execute delete method.
import React, {Component} from 'react';
import axios from 'axios';
import…

aarans
- 29
- 8
0
votes
0 answers
react-bootstrap-typeahead connected to a table as a search input
I am attempting to use react-bootstrap-typeahead as the search input for my react-data-table-component so that there would be an autosuggest option. My problem is on how could i reflect the selected option to my dataTable in such it would only show…

maria
- 363
- 2
- 5
- 14