search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Angular2 row filter + auto width

Asked by VScode
7 years ago.

Hi
Is row filtering working or in the works? can't find onRowFilter,
also trying to figure out how to get auto width in a 3 column resource layout,
is that possible ? seems to be a fixed width by default.

Answer posted by Dan Letecky [DayPilot]
7 years ago.

A tutorial on row filtering in Angular 2 is in the works and it will be published in a day or two.

The row header width autofit should work fine, let me check that.

Comment posted by Dan Letecky [DayPilot]
7 years ago.

Update: row header width auto-fit seems to work fine. Just note that it can only make the column wider (it never shrinks the width).

See also:
https://doc.daypilot.org/scheduler/row-header-width-auto-fit/

The default row header width is set using rowHeaderColumnDefaultWidth property (default value is 80 pixels). You can override it globally using rowHeaderColumnDefaultWidth or per column using rowHeaderColumns:

config: any = {
  // ...
  rowHeaderColumns: [
    { title: "Column 1", width: 40},
    { title: "Column 2"}
  ],
  // ...
}
Comment posted by MT
7 years ago.

Strange, I have tried this config in a scheduler
rowHeaderColumnDefaultWidth: 10, // mapped in dp ts file ??
rowHeaderWidthAutoFit: true, // mapped in dp ts file ??
rowHeaderColumns: [
{ title: 'ABC123ABC123ABC123' },
{ title: 'AB' },
{ title: 'ABC' },
],

with this I get like a fixed column width of like 10, if I remove rowHeaderColumnDefaultWidth
it seems to default to 80 with the first column truncated. Am I missing something here ? :)

Comment posted by Dan Letecky [DayPilot]
7 years ago.

I can see the problem now - you need the column titles to be adjusted. It's only implemented for the column content at the moment:

  resources: any[] = [
    { name: "Resource 1", id: "R1", columns: [ {html: "aaaaa bbbbbb ccccccc dddddd eeeeee" } ]},
    { name: "Resource 2", id: "R2"}
  ];

Comment posted by MT
7 years ago.

Ok,
problem is that I planned using i18n translation on column header text, so the width is not known beforehand.

Comment posted by Dan Letecky [DayPilot]
7 years ago.

Ok, let me check that.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.