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

How can I add textbox or search on Contextmenu?

Asked by Akhtar Raza
9 days ago.

I want to add a textbox in the context menu for searching purposes. Because I have N of the list of users. So I want to search on the context menu for filtering pupros. I'm using the Angular 7 versions.

Answer posted by Dan Letecky [DayPilot]
8 days ago.

Unfortunately, the context menu doesn't support a search box or custom elements.

To select a user from a long list you can use a dialog created using DayPilot Moal which supports a searchable list:

import {Modal} from '@daypilot/modal';

// ...

const form = [
  {
    type: 'searchable',
    id: 'user',
    name: 'User',
    options: [
      {
        name: 'User 1',
        id: 'user1',
      },
      {
        name: 'User 2',
        id: 'user2',
      },
    ],
  },
];
const data = {};

Modal.form(form, data).then(modal => {
  console.log(modal.result);
});
Comment posted by Akhtar Raza
8 days ago.

Thanks for the reply.

New Reply
This reply is
Your name (optional):