Telerik Forums
KendoReact Forum
1 answer
1.0K+ views

Hello,

We are fetching records from server and creating a dropdown list and would like to set the first item in that list as the default selected item in the dropdown. The example in the documentation only shows a hardcoded list with a "Select sport..." default item.We tried to set the default item to the first element in the async list, but the first element will show up twice in the dropdown! Please help:

 

import React from 'react';
import ReactDOM from 'react-dom';
import { DropDownList } from '@progress/kendo-react-dropdowns';

class AppComponent extends React.Component {
    sports = [ 'Basketball', 'Football', 'Tennis', 'Volleyball' ];

    render() {
              return (
                    <DropDownList
                          data={this.sports}
                           defaultItem={this.sports[0]}
                    />
);
}
}

ReactDOM.render(
<AppComponent />,
document.querySelector('my-app')
);

Stefan
Telerik team
 answered on 20 Mar 2019
4 answers
868 views

Hi, I am using the Autocomplete Dropdown component and I should not show the dropdown if there is a special character typed and instead display a message. I achieved that but I am unable to fix the dropdown display. Can someone help me out please?

 

Basic behavior to achieve is dropdown shouldn't be shown initially, and should show ONLY when user starts typing in something and do not show dropdown in case user enters special characters and show a message.

 

P.S: I might have multiple autocomplete on a page. Any way to simplify my code?

 

Stackblitz: https://stackblitz.com/edit/react-dvpfg5?file=app/main.js

Stefan
Telerik team
 answered on 20 Mar 2019
2 answers
191 views

Hi Stuff,

I have two questions, 1.Is there a way I can make the upload file to be a hyperlink? Now I set the autoUpload to be false. So once the file uploaded. The file name will be clickable.    2. Can I put a placeholder in the drag and drop box. such as the attachemnt picture.

<Upload
batch={false}
multiple={false}
onAdd={this.handleAddFile}
files={this.state.files}
autoUpload={false}
withCredentials={false}
onStatusChange={this.onStatusChange}
onRemove={this.onRemove}
restrictions={{
allowedExtensions: ['.pdf']
}}
saveUrl={'https://demos.telerik.com/kendo-ui/service-v4/upload/save'}
removeUrl={'https://demos.telerik.com/kendo-ui/service-v4/upload/remove'}
/>      

 

Thank you.

 

 

 

 

Vladimir Iliev
Telerik team
 answered on 19 Mar 2019
1 answer
517 views

Hi,

I want to add focus event on NumericTextBox.Can you please suggest how to add focus event to NumericTextBox as i have to trigger some event based on focus.

please find the below implementation  i need to achieve:-

 

<NumericTextBox type="text" name={name} className={cssClass} onChange={(ev) => this.onChange(ev) onFocus = {this.onFocusNumericGroupInput} />

 

onFocusNumericGroupInput = () => {
console.log("focus event fired")
}

 

 

 

 

Vasil
Telerik team
 answered on 19 Mar 2019
1 answer
324 views

Hi,

Is there an option to prevent minus symbol in numeric text box?

Regards,

Balaji

Vasil
Telerik team
 answered on 19 Mar 2019
2 answers
279 views

 

Hi,

 I am using Kendo react autocomplete search box in our project. (import { AutoComplete } from "@progress/kendo-react-dropdowns";)

 Whenever user starts typing in search textbox its shows best match from results highlight with box border. I want to remove this heighlight from best match which in middle of search result and  when user starts navigating using keyboard it should start from 1st item in search results. Is there any way to achieve this ?

Also for filter I am using operator: "contains", Is there any way to order result of filter as best match on top and then rest of matches.

 

Prajakta
Top achievements
Rank 1
 answered on 15 Mar 2019
1 answer
2.7K+ views

I have a need to refresh a currently displayed KendoReact Grid with the latest data coming from the server (i.e. real time changes made by others). Is this possible currently with KendoReact's Grid component? If so, is there a demo that I can review the code to gather how to do this?

Thanks.

Jim Minnihan

SKF, Inc.

Stefan
Telerik team
 answered on 15 Mar 2019
3 answers
571 views

Anyone know how to do a name validation when I upload the files. Not the extension. 

<Upload
batch={false}
multiple={true}
defaultFiles={[]}
withCredentials={false}
restrictions={{
allowedExtensions: ['.xlsx', '.xls']
}}
saveUrl={'https://demos.telerik.com/kendo-ui/service-v4/upload/save'}
removeUrl={'https://demos.telerik.com/kendo-ui/service-v4/upload/remove'}
/>

Thank you Very much

 

 

 

xin
Top achievements
Rank 1
 answered on 13 Mar 2019
1 answer
398 views

I have a zoomable Kendo React Chart where I have set a maximum on the . If the user zooms in and zooms out that max is lost.

In my particular use case, I have 2 series each with their own . The second series should really always be shown on a scale from 0-3. To do this I have set a max on the second Y axis to 3 but this is lost as soon as the user zooms.

 

I do want the user to be able to zoom but when they zoom back out I expect the user to be able to return the chart to its initial state of having a max of 3 on the . 

 

This  show this behavior: https://stackblitz.com/edit/react-l5udtx

 

Is there a recommended way to achieve this?

 

Stefan
Telerik team
 answered on 11 Mar 2019
1 answer
147 views

Hello,

We have a need to recreate the grid entirely when user selects an option from a dropdown. Both columns and data will be different.

Currently, I have tried updating the datasource being passed to the grid, but the old columns still remain.

Is it possible to get a demo on how to do this with the React grid version? This is a common use case.

Your help is appreciated,

Mihai

Stefan
Telerik team
 answered on 11 Mar 2019
Narrow your results
Selected tags
Tags
General Discussions
Grid
Wrappers for React
Charts
Scheduler
Filter 
DropDownList
Form
DatePicker
Styling / Themes
Editor
TreeList
Styling
PDF Processing
ComboBox
Excel Export
Dialog
Input
TreeView
Upload
Drawer
Button
Drag and Drop
MultiSelect
Tooltip
Accessibility
NumericTextBox
Checkbox
Menu
Gantt
DateTimePicker
PDF Viewer
Popup
Window
AutoComplete
DateInput
Sortable
Data Query
Licensing
TabStrip
Drawing
Calendar
Pager 
Labels 
Localization
TimePicker
GridLayout
FontIcon
Animation
PanelBar
TaskBoard
PivotGrid
Card
DropDownButton
Conversational UI 
DateRangePicker
Splitter
Badge 
Security
Slider
Spreadsheet
ContextMenu
MultiViewCalendar
Stepper
MultiColumnComboBox
MultiSelectTree
TextBox
AppBar
File Saver
ListView
MaskedTextBox
RadioButton
Switch
TextArea
Toolbar
DropDownTree
TileLayout
Map
Avatar
Date Math
Gauge
RadioGroup
RangeSlider
Rating
Loader
ExpansionPanel
SvgIcon
Typography
ProgressBar
ScrollView
Popover
StockChart
RadialGauge
Server Components
AIPrompt
Page Templates / Building Blocks
AI Coding Assistant
Chat
ColorGradient
ColorPalette
ColorPicker
Notification
Ripple
Skeleton
ButtonGroup
Chip
ChipList
FloatingActionButton
SplitButton
ActionSheet
Barcode
QR Code
FlatColorPicker
Signature
BottomNavigation
BreadCrumb
StackLayout
Timeline
ListBox
ChunkProgressBar
Sparkline
FileManager
ArcGauge
CircularGauge
LinearGauge
ExternalDropZone
OrgChart
Sankey
VS Code Extension
InlineAIPrompt
SpeechToTextButton
Chart Wizard
Agentic UI Generator
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
OTP Input
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?