score:0
To pass with as percentage in a react component you just need to do the following width='100%'.
score:1
To make a given column resizable, set column.resizable = true
.
If you need to know when a column
has been resized, use the onColumnResize
prop. This will be triggered when a column is resized and will report the column index and its new width.
These can be saved on the back-end and used to restore column widths when the component is initialized, by setting width
key in each column.
pass resizable:true
which you want to resize like below.
this._columns = [
{
key: 'id',
name: 'ID',
resizable: true,
width: 40
},
{
key: 'task',
name: 'Title',
resizable: true
}]
score:2
I know maybe it is late but you can achieve this by setting the value as string
const columns = [
{
key: 'Month',
name: 'Mes',
width: '50%',
},
{
key: 'Tickets',
name: 'Tickets',
width: '10%',
},
];
Hope it helps
Source: stackoverflow.com
Related Query
- How to pass percentage value to width to React data grid column
- how to make material data grid width to fill the parent component in react js
- How to Dynamically FIx the header Column width in React Bootstrap-Table-Next with respect to data cell
- How can I pass data using <Redirect> in react router v4?
- How can I pass data from express server to react views?
- How to add data attribute without value in react create element?
- How do you pass data when using the navigate function in react router v6
- How to make a Column data clickable one in React table?
- How can mock the value of a state and data in my react test
- How to pass data from React Form -> Flask Backend -> React Component (does it have something to do with CORS)?
- How to pass input value from child to parent component react
- How to activate a react route and pass data from the service worker?
- How to pass data from one component to another in React or React-Redux?
- How to save state of column visibility in material ui data grid
- How to pass server data into React component
- React - How to pass returned data from an exported function to a component?
- How to pass data from a page to another page using react router
- React JS How to pass data between pages in Hook ( useEffect)
- How to pass down data through 3 class components in react correctly?
- Gatsby: how to pass data to React Context at build time
- How to pass data from vanilla JavaScript to React functional component
- React Data Table Expandable Rows : how to pass additional Props
- How to create new line in react table column with lots of data
- How to make react data grid table cell editable and focused on click of a button without performing a double click action
- How to set the default react context value as data from firestore?
- React - how to populate one select menu based on a value of another select menu using data from a local .json file
- How Do I Pass a Function Through A React Component For Data Sharing Between Parent and Child?
- How to pass value of a const from one .js file to another in React JS?
- How to pass data to a Chart.js chart in React
- How to pass a value from <a> (anchor tag) to a function in react js?
More Query from same tag
- Storybook hot reloading causes hooks error
- Statsig - How to get true value from feature gate?
- can I create a route that could be use both for serving HTML and REST API?
- Uncaught TypeError: tasks.map is not a function
- React Native - "undefined is not an object (evaluating 'MyApp.navigation.openDrawer')
- How to share a dynamically generated image from react with react-share?
- Animating a circle filling from bottom to top by a dynamic percentage
- What do these different usages of ‘import’ represent?
- Local state in container component
- React map through two arrays without duplication
- How to create a simple React Dropdown with Date range
- CSS: How to make two grids equals (one of them over the other)
- Add transition to MUI Chip when Delete Icon appears on hover
- How can I save this DatePicker to firestore in a timestamp format?
- Question about react class component setState
- React JS - Can't maintain and render the state values after onclick
- passing argument to react component with routes and links
- add input field when button is clicked
- How to use environment variables in ReactJS imported CSS?
- Unexpected result with React Hooks setState
- Logging in in the second time
- i want to retrieve location from promise aaray of open cage geocoding by passing lat and log but dont know how to retrieve the value
- May i render the react-portal inside my react application?
- Execute useEffect() only on specific setState()
- React useState - strange behaviour with useState and arrays
- Make useEffect only run when component is in view (i.e. scrolled down to that component)
- Unhandled Rejection (SyntaxError): Unexpected end of input - POST Fetch?
- props not being updated properly in Login page button action with React JS
- ReactJS - Validate Nested-IF/ELSE Statement
- how to have 8 or 9 digit + DDD phone mask using react imask?