As I go through and implement + style the KendoReact controls for use in our dynamic forms, would you like me to report any "bugs" I may find in the forum or is there a better place?
What I found today was a styling issue. I noticed that the NumericTextBox didn't look the same as the other inputs when focused. At first, I figured it was because of some kind of SCSS shenanigans that I've been fighting, but then I realized that .k-state-focused wasn't applied. As soon as I manually did it via Chrome DevTools, it looked exactly as expected.
Here's an example: https://stackblitz.com/edit/react-s8ugrr-vnxuc1?file=app/main.jsx
As you tab thru, you'll see that all controls except the NumericTextBox apply the box shadow.
Thanks again,
Kyle
When setting the initialValues of the Form component, it seems to work for everything I've used so far, except for a Switch. If I use a CheckBox instead, it seems to work fine.
I've created a StackBlitz using snippets from your own docs: https://stackblitz.com/edit/react-s8ugrr-c3bw3k?file=app/main.jsx
If you change FormSwitch to FormCheckbox on line 117, you can see what I mean.
I'm setting the initialValues object to be in the following format:
{ mySwitchControlName: true }
After two days of trying to get the Form component to work for my needs, I've hit a pretty major roadblock for our product.
Use Case: Admin creates a template with dynamic fields. End user consumes the template, but has multiple instances of it in a single page. End user shouldn't need to go thru each instance of the template. They should be able to click "Submit" and all template instances are validated. First invalid instance is displayed.
In Kendo UI, this was easy. You iterate all the <form> elements and run .validate() on it.
var
forms = $(
"form"
).submit(
function
(e) {
e.preventDefault();
}).kendoValidator();
$(
".btn-primary"
).click(
function
() {
var
firstInvalidForm =
null
;
tabPaneForms.each(
function
() {
// Iterate all the tabs and validate the input
var
that = $(
this
);
if
(!that.data(
"kendoValidator"
).validate() && !firstInvalidForm) {
firstInvalidForm = that;
}
});
if
(firstInvalidForm) {
// Find the first invalid field and display the tab
}
else
{
// Serialize all the data
var
form = $(
"#frmData"
);
serializeFormData(form);
// POST the data
form.submit();
}
});
Now, I realize KendoReact is NOT Kendo UI, and that React is a totally different thought process than good ol' jQuery. However, I need something similar.
The problem I keep running into is that everything that I need is in FormRenderProps. Your Form control expects you to hit a Submit button inside of the Form's render function. Originally, I didn't want this, but I was able to wrap my entire UX in the form to make it work (not too pleased that I had to, though). So when the Submit button is clicked, it uses formRenderProps.onSubmit, which does some blackbox magic and raises the Form's onSubmitClick/onSubmit events. Things were going fine until I realized I can't do this purely linearly.
I've forked your Multi-Step Form example and quickly tweaked it to be similar to my team's needs. We're using a Stepper to mimic the tabs that we use (though the actual UX control we use is more similar to your TabStrip): https://stackblitz.com/edit/react-vqk7ya?file=app/data.jsx
The idea is that the end user should be able to either click "Submit" and have the validation code run for each Stepper step/TabStripTab or they can jump around as they wish by clicking the actual Stepper step/TabStripTab. For our needs, validation only needs to occur on Submit (but each step must be validated on Submit click).
Hello!
1. Is there a way to customize TimeLineView to show week days (Monday , Tuesday ...) because I need that form that contains day and time intervals on upper bar.
2. Can we customize the modal to show my dropdowns / buttons from the scheduler?
3. I need to group multiple data but i don t want to repeat that categories. For example I will have a list of multiple years (I, II , III) that contains multiple specializations but I don t want the secound year (II) to repeat the same specializations. I want those years to have their own specializations.
4. Can we use KendoReact with SignalR?
Hi,
I have to print the component that has simple table of contents. You can see the example on StackBlitz.
When PDF is generated links do not lead to corresponding sections inside PDF, they lead to external links.
What would be preferred solution to fix this so that links lead to PDF pages/sections?
Thanks
Examples that I see are using class components.. is there an example that uses functional components? Any simple example will do.
https://www.telerik.com/kendo-react-ui/components/grid/rows/hierarchy/
Hi,
I have a custom cell where I can have 2 states (read only and editable). The problem is that GridCellProps does not contain any information about column edit mode. Example https://stackblitz.com/edit/react-qzapj7?file=app/main.jsx
<
Column
field
=
"Discontinued"
title
=
"Discontinued"
cell={DropDownCell}
editable={false} // no access to "editable" from DropDownCell
/>
and something like this
<
Column
field
=
"Discontinued"
title
=
"Discontinued"
cell={editable? DropDownCellEdit : DropDownCellReadOnly }
/>
or
<Column
field="Discontinued"
title="Discontinued"
cell={(props) => <DropDownCell {...props} editable={editable}/> }
/>
is not possible in my case.
Any plans to add this information to GridCellProps ?
In the MultiSelect component in Kendo.Mvc, we have the option of specifying a grouping for the data. Is there a similar option in the React MultiSelect component that I missed?
Thank you,
Hi
I am struggeling writing a test controlling the KendoReact ComboBox using react-testing-library. I guess I am not the first trying to achieve that. I am just trying to select the combobox and change the selected value. How can I do that?
Regards,
Christian