Re: New mechanism in backgrid to render different types of cells in same column [pgAdmin4]

Поиск
Список
Период
Сортировка
От Harshal Dhumal
Тема Re: New mechanism in backgrid to render different types of cells in same column [pgAdmin4]
Дата
Msg-id CAFiP3vzkf6pis7uUjBLKa=nU1MN1AWFr-8xjoBmZChMrJhbZ_Q@mail.gmail.com
обсуждение исходный текст
Ответ на New mechanism in backgrid to render different types of cells in same column [pgAdmin4]  (Harshal Dhumal <harshal.dhumal@enterprisedb.com>)
Список pgadmin-hackers
+
Also fixed some minor issues related to Unique column functionality in Variable control in same patch.

-- 
Harshal Dhumal
Software Engineer 




On Tue, Jan 19, 2016 at 12:37 AM, Harshal Dhumal <harshal.dhumal@enterprisedb.com> wrote:
Hi,

This patch is replacement for our developed DynamicVariablecell.

Now we can pass cellFunction in column schema to get appropriate cell class.
User provided cellFunction must return valid cell class.
cellFunction will be called with context (this) as column and model as argument.

eg.:

schema: [
{id: 'name', label:'Name', type:'text', editable: false, cell: 'string'},
{
id: 'value', label:'Value', type: 'text', editable: true,
cellFunction: function(model){

if (isNaN(model.get(this.get('name')))) {
return "string";
} else {
return Backgrid.NumberCell;
}
}
},
{id: 'database', label:'Database', type: 'text', editable: false},
.
.
.



-- 
Harshal Dhumal
Software Engineer 




В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Harshal Dhumal
Дата:
Сообщение: New mechanism in backgrid to render different types of cells in same column [pgAdmin4]
Следующее
От: Ashesh Vashi
Дата:
Сообщение: pgAdmin 4 commit: Moving the data model and collection to separate modu