Posted 25 April 2021, 10:55 am EST
The default color for on focus of a cell on the sheet is green. Can you please help with the procedure to change that color to a different one (Ex: Orange) and also change the style like
thickness etc.
Thanks
Forums Home / Spread / SpreadJS
Posted by: rehman.khaleelur on 25 April 2021, 10:55 am EST
Posted 25 April 2021, 10:55 am EST
The default color for on focus of a cell on the sheet is green. Can you please help with the procedure to change that color to a different one (Ex: Orange) and also change the style like
thickness etc.
Thanks
Posted 25 April 2021, 8:49 pm EST
Hi,
You may use the gc-selection CSS class for the required functionality. Please refer to the following code snippet and let us know if you face any issues.
.gc-selection {
background-color: rgba(20, 20, 20, 0.2);
border-color: #d4de4a;
color: rgba(240, 240, 240, 0.7);
}
Regards
Avinash
Posted 26 April 2021, 2:58 am EST
But in case we have to use the material-ui class for styling like under the hook API section here (https://material-ui.com/styles/basics/)
and cannot use plain css file in the code, how can we go about this one.
Posted 26 April 2021, 9:57 pm EST
Hi Rehman,
We are sorry but SJS does not support this functionality. What you could do is make a custom theme CSS file and import it where you are initializing the spread component. Please refer to the following sample that demonstrates the same.
sample: https://codesandbox.io/s/delicate-cherry-6qm7h?file=/src/index.js
Regards
Avinash