Telerik Forums
KendoReact Forum
1 answer
121 views

I am trying to set the button themeColor attribute to a variable such as:

let themeColor: string = 'dark';

themeColor={themeColor}

but I get the error:

 

Type 'string' is not assignable to type '"base" | "dark" | "success" | "error" | "warning" | "info" | "primary" | "secondary" | "tertiary" | "light" | "inverse" | null | undefined'.ts(2322)
Button.d.ts(70, 5): The expected type comes from property 'themeColor' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Button> & Pick<Pick<Readonly<ButtonProps>, "form" | ... 283 more ... | "onTransitionEndCapture"> & Pick<...> & Pick<...>, "form" | ... 279 more ... | "onTransitionEndCapture"> & InexactPartial<...> & InexactPartial<...>'
(property) themeColor?: "base" | "dark" | "success" | "error" | "warning" | "info" | "primary" | "secondary" | "tertiary" | "light" | "inverse" | null | undefined
Patrick
Top achievements
Rank 1
Iron
 answered on 06 Mar 2024
1 answer
286 views

    Seeing this bug locally, and was able to reproduce it in CodeSandbox:

    1. Open this demo in CodeSandbox https://www.telerik.com/kendo-react-ui/components/grid/pdf-export/#toc-getting-started (original sandbox link: https://codesandbox.io/p/sandbox/proud-snow-z89k2q?)
    2. Ensure Dependencies includes React 18
    3. Make these changes to the bottom of main.jsx:
    • Comment out this line:

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

    • Add these three lines in place of the above one:

    const container = document.querySelector('my-app');
    const root = createRoot(container); // createRoot(container!) if you use TypeScript
    root.render(<App />);

    A finished Sandbox in case it saves you some time -- https://stackblitz.com/edit/react-epnjnd?file=app%2Fmain.jsx

     

    • Notice that the first sandbox on page load gives the React 17/18 react-dom.render() issue. In contrast, the finished sandbox doesn't give the React 17/18 issue. This behavior is to be expected.
    • Click on "Export PDF" button. You now get the React 17/18 error on both sandboxes. You'd expect the error not to show up on the finished sandbox, as the parent code no longer utilizes the "old way of rendering React".
    Wissam
    Telerik team
     answered on 06 Mar 2024
    1 answer
    189 views

    I have a feature to add display a numeric textbox in the grid while doing in-cell editing. & it depends on a checkbox value.  If the check box in another column is  selected then only the the numeric textbox should be editable in. Kindly help me with a numeric textbox as a custom component in incell grid editing.

    I tried to create a numeric textbox as custom component. But i am facing couple of issues.

    1)If i add the editor as numeric then the checkbox condition is not matching.

    2)if i add editor as text, the cursor in the numeric textbox is not showing if i tryto add more than 1 digit.

                                                                                <GridColumn

    width='120px'
    field='Max'
    title='Max'
    columnMenu={ColumnMenu}
    headerClassName={
    isColumnFiltered(Max')
    ? 'filter-active'
    : 'filter-inactive'
    }
    editable
    cells={{
    edit: {
    text: MaxRecurring,
    },
    }}
    editor='numeric'
    />
    Konstantin Dikov
    Telerik team
     answered on 06 Mar 2024
    2 answers
    99 views

    Hi,  I've created a drop-down list for my react application. However, when I set the initial value, the required validator is triggering even though a selection has been made. Is there something else I need to be doing?

    <Field
    name={'site'}
    component={FormDropDownList}
    textField="title"
    dataItemKey="id"
    data={sites}
    // label={'Select the site you are attending.'}
    defaultItem={sitesReducer.nearestSite ? sitesReducer.nearestSite : {
    title: 'Select...',
    }}
    validator={requiredValidator}
    />
    Lee
    Top achievements
    Rank 1
    Iron
     answered on 03 Mar 2024
    1 answer
    510 views

    Hi,

    The older versions of grid had three dots as the grid column header filter icon. The new versions have a different filter icon. How to use the three dots in new version (@progress/kendo-react-grid@^7.2.3)?  Please see the attached image for the three dots icon.

     

    Thanks,

    Jie

    Wissam
    Telerik team
     answered on 01 Mar 2024
    1 answer
    97 views

    Hi Team, 

    Overview:

    We are using Kendo Ui react grid for showing data . We have more than 15 columns in grid with horizontal scrollbar

     

    Problem :

    When we are selecting last column in view of screen for sorting/filtering, Kendo Grid automatically changing the view to make that sleected column in center of screen. We are not doing anything explicit for this behaviour to occur . We need to know is this something done  by default through Kendo UI and how we can rectify this issue .

     

    Konstantin Dikov
    Telerik team
     answered on 27 Feb 2024
    1 answer
    102 views

    Hi, I was just wondering if there is some type check in KendoUI that I could use to check translation files so that nothing is missed in translations?

    I've tried to search forums and documentation site and I did not found any examples of that. If there is no support for this at the moment, maybe it should be added, since I am sure that many dev teams struggle with keeping the huge number of translations up to date.

    Vessy
    Telerik team
     answered on 26 Feb 2024
    1 answer
    178 views

    Hi,

    Is there a way to have both rowSpan and Pagination on a grid? 

    My grid originally has pagination, now that I am trying to merge rows, which have the same values, within a column into a cell; other columns remain the same. I found that once I achieve that it displayed the grid briefly (enough to observed merged rows), but it crashed right away and report error on pagination. I can't remember the exact error but it has something to do with "process", "slice"...

    Thank you for the support

    Luu

     

    Konstantin Dikov
    Telerik team
     answered on 25 Feb 2024
    1 answer
    136 views
    Hello.

    We have used jQuery Kendo UI for many years. And we have many templates in Kendo UI for jQuery Templates.

    Now we use more React. We have a problem with a lot of jQuery templates. Isn't there some utility, functionality in React Kendo UI that can process the given jquery template? Or some npm package that would be able to process the given template in the React environment?

    Well thank you.
    Konstantin Dikov
    Telerik team
     answered on 23 Feb 2024
    1 answer
    207 views

    Overview

    Some components have a ::before pseudoclass with the content property set to the CSS code \200B , which is a zero-width space. However, in our project, this is coming out as ​ in the DOM.

    For example, with the <Dialog /> component:

    1. We render the dialog within a componet, giving it a title which comes from props

    const MyComponent = (props) => {
        return (
            <Dialog title={props.title} onClose={props.onClose}>
                . . .
            </Dialog>
        )
    }

    2. Locally (running in our development environment) we can see the CSS come out as expected

    3. After building and deploying to an environment, the "" gets replaced with ​

    Additional Information

    After building the project locally, our CSS (build/static/css/main,xyz.css) does not include these symbols:

    We are using Craco to build our project:

    // craco.config.js
    
    module.exports = {
      style: {
        postcss: {
          plugins: [require('autoprefixer')]
        }
      }
    }
    
    Konstantin Dikov
    Telerik team
     answered on 22 Feb 2024
    Narrow your results
    Selected tags
    Tags
    +? more
    Top users last month
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
    Rob
    Top achievements
    Rank 3
    Bronze
    Bronze
    Iron
    ivory
    Top achievements
    Rank 1
    Iron
    Nurik
    Top achievements
    Rank 2
    Iron
    Iron
    YF
    Top achievements
    Rank 1
    Iron
    Want to show your ninja superpower to fellow developers?
    Top users last month
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
    Rob
    Top achievements
    Rank 3
    Bronze
    Bronze
    Iron
    ivory
    Top achievements
    Rank 1
    Iron
    Nurik
    Top achievements
    Rank 2
    Iron
    Iron
    YF
    Top achievements
    Rank 1
    Iron
    Want to show your ninja superpower to fellow developers?
    Want to show your ninja superpower to fellow developers?