DevExpress / devextreme-reactive

Business React components for Bootstrap and Material-UI

Home Page:https://devexpress.github.io/devextreme-reactive/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Devextreme Scheduler React - EditReccurenceMenu/availableOperations

BartekObudzinski opened this issue · comments

Hi i wanted to disable one opiton in availableOperations in EditReccurenceMenu. It is currentAndFollowing option.

I have used it like this:

export const layoutComponent = ({ ...restProps }: EditRecurrenceMenu.LayoutProps) => { return ( <EditRecurrenceMenu.Layout {...restProps} availableOperations={['all | current']} /> ); };

And received two empty radio buttons with no message and no available operations,
and i expected all, and current option

The value for availableOperations is an array of objects with value and title properties like below:
imagen

You can take those values from restProps, filter them out like you want ant then pass them out to the <EditRecurrenceMenu.Layout> component:

Example:

export const layoutComponent = (props: EditRecurrenceMenu.LayoutProps) => {
  const { availableOperations } = props;
  const myOperations = availableOperations.filter(({ value }) => value !== 'currentAndFollowing' );
  return ( <EditRecurrenceMenu.Layout {...props} availableOperations={myOperations} /> );
};

Thank you for using Devextreme Reactive. We use GitHub issues to track bug and feature requests. We process incoming issues as soon as possible. Issues that have been inactive for 30 days are closed. If you have an active DevExtreme license, you can contact us in our Support Center for updates. Otherwise, post your question on StackOverflow.