简体   繁体   English

如何在网格单元(Ext JS)上覆盖 x-grid-cell-inner CSS?

[英]How to override x-grid-cell-inner CSS on the grid cells (Ext JS)?

I am trying to override the inner-cell white-space property in a grid.我正在尝试覆盖网格中的内部单元格空白属性。 Setting cls: 'custom-grid' does not change the styling.设置 cls: 'custom-grid' 不会改变样式。 Please help.请帮忙。 My CSS file:我的 CSS 文件:

div.custom-grid div.x-grid-cell-inner {
  white-space: normal; /* changed from nowrap */
}

Definition:定义:

    Ext.define('My.Panel', {
    extend: 'Ext.grid.Panel',
    cls:'custom-grid' //tried this didn't work
    loadMask: false,    
    scrollable: true,    
    frame: true,

    initComponent: function () {
        let me = this;
        let store = 'base.store.notes'; 
        me.store = store;
        me.columns = [
            {header:Text.Shoppers, width: 100, dataIndex: 'shoppers'},
            {header:Text.Id, width: 100,  dataIndex: 'val'},
        ];
       
        me.callParent(arguments);
    }

The first div is wrong.第一个 div 是错误的。 It should look like this:它应该是这样的:

.custom-grid div.x-grid-cell-inner {
  white-space: normal; /* changed from nowrap */
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM