Skip to content

Agenda toggle knob with a function #937

Open
@elliscwc

Description

@elliscwc

This might related to #309

I want to show the calendar list with a call of the function in the agenda component, is there a way to do it correctly? Someone has suggested this way but is no longer working

function Agenda(props) {
  const agenda = useRef(null);

  useEffect(() => {
    // doesn't work anymore
    agenda.current.setScrollPadPosition(0, true);
    agenda.current.enableCalendarScrolling();
    
    // suggestion?
    const animated = false;
    agenda.current.toggleKnob(animated);
  }, []);

  return (
    <Agenda
      ref={agenda}
      items={[]}
      renderItem={() => <View />}
      renderEmptyDate={() => <View />}
      renderEmptyData={() => <View />}
      rowHasChanged={(r1, r2) => r1.text !== r2.text}
      refreshing={false}
      style={styles.container}
    />
  );
}

3

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions