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
2 years 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]
2 years 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
2 years ago.

Thanks for the reply.

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