# 一覧画面で編集する時にカラム幅が広がる問題

**URL:** <https://community.cybozu.dev/t/topic/3692>\
**Category:** kintone 開発相談\
**Created:** [2019 年 1 月 11 日午前 6:46 UTC](https://community.cybozu.dev/t/topic/3692 "2019-01-11T06:46:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Legacy\_Account688](https://avatars.discourse-cdn.com/v4/letter/l/d2c977/32.png) [@Legacy\_Account688](https://community.cybozu.dev/u/Legacy_Account688)\
**Post date:** [2019 年 1 月 11 日午前 6:46 UTC](https://community.cybozu.dev/t/topic/3692/1 "2019-01-11T06:46:58Z")

</div>

一覧画面でペンボタンから編集しようとすると

なぜかと単にカラムの幅が伸びて非常に使いにくいです。

これはどうにかならないんでしょうか。

ウィンドウの外に保存ボタンが出ていってしまいかなりイライラします。

---

<div class="post-metadata">

**Author:** ![Legacy\_Account1740](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@Legacy\_Account1740](https://community.cybozu.dev/u/Legacy_Account1740)\
**Post date:** [2019 年 2 月 20 日午前 7:00 UTC](https://community.cybozu.dev/t/topic/3692/2 "2019-02-20T07:00:57Z")

</div>

tanaka様

お世話になっております．  
cstapの江田と申します．

無理やりですが、以下のコードで実装できます。  
一覧を表示したときのカラムの幅を保存して、編集時のカラムの幅を保存した幅に変えます。

```
(function(){"use strict";varwidths;kintone.events.on('app.record.index.show',function(event){widths=[].map.call(document.getElementsByClassName('recordlist-header-cell-gaia'),function(th){returnth.style.width;});});kintone.events.on(['app.record.index.edit.show','app.record.index.edit.submit.success',],function(event){setTimeout(function(){[].forEach.call(document.getElementsByClassName('recordlist-header-cell-gaia'),function(th,index){returnth.style.width=widths[index];});},100);});})();

```
