Category : rsuite

Need to get the value of label in the select picker drop_down_data has these two values value:(here is the id or key) label:(is the name) sample data: value:"60868932d8c9e10c42a93df0", label:"Tony Stark" This is my code: <Field name="first_group_name" render={(fieldProps) => ( <SelectPicker data={this.props.drop_down_data} // searchable={false} size="lg" onChange={fieldProps.input.onChange} value={fieldProps.input.value} placeholder="Group name" /> )} /> when console logging fieldProps ..

Read more

<Nav appearance="subtle" justified removable activeKey={activePage[‘link’]} > { tabs.map(tab => { const menu = menus.find(a => a.link === tab); return <Nav.Item key={menu ?.key} keyEvent={tab} onSelect={()=>{console.log(‘test’)}} } </Nav> I’m trying to console the navigation item, but when I try to click the item it doesn’t display the log test on the devTool console. How to fix it? ..

Read more

<Nav appearance="subtle" justified removable activeKey={activePage[‘link’]} onSelect={onSelectTab}> { tabs.map(tab => { const menu = menus.find(a => a.link === tab); return <Nav.Item key={menu ?.key} eventKey={tab}>{menu ?.label}</Nav.Item> }) } </Nav> How to add a context menu inside the nav.item cause I’m having a trouble when I try to add a button inside the nav.item it cause Problem which ..

Read more

tabs: [ ‘/home’, ‘/about’, ‘/chat’ ]; <ResponsiveNav ppearance="subtle" justified removable moreText={<Icon icon="more" />} moreProps={{ noCaret: true }} activeKey={activePage[‘link’]} onSelect={onSelectTab} onItemRemove={eventKey => { console.log(eventKey) }}> {tabs.map(tab => { const menu = menus.find(a => a.link === tab); return <ResponsiveNav.Item key={menu ?.key} eventKey={tab}> {menu ?.label}</ResponsiveNav.Item> })} </ResponsiveNav> How to remove the value ‘/chat’ from the tabs. What I ..

Read more

<ResponsiveNav appearance="subtle" removable moreText={<Icon icon="more" />} moreProps={{ noCaret: true }} activeKey={activePage[‘link’]} onSelect={onSelectTab} onItemRemove={eventKey => { }} > {tabs.map(tab =>{ const menu = menus.find(a => a.link === tab); return <ResponsiveNav.Item key={menu?.key} eventKey={tab}> {menu?.label}</ResponsiveNav.Item> })} </ResponsiveNav> What I’m trying to do is to remove the tab list when click the close icon. for example I have a ..

Read more

What I’m trying to do is to set a date on date range but there’s an error which is Type ‘Date[]’ is not assignable to type ‘[Date?, Date?]’. Types of property ‘length’ are incompatible. Type ‘number’ is not assignable to type ‘0 | 1 | 2’ code: const [ dateRange, setDateRange] = useState([new Date(‘2017-02-01’), new ..

Read more