This is a migrated thread and some comments may be shown as answers.

Add TextArea for each Upload File

3 Answers 199 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ofer
Top achievements
Rank 1
Veteran
Ofer asked on 29 May 2020, 11:21 PM

In one of my implementation of KendoReact I use the Upload component with success.

My users want to be able to write some text to be added to each file. (instructions etc...)

Is it possible to overload the Upload component and add a <textarea /> next to each file and have the content as a property of each file? 

Using a "TextareaAutosize" will be even better.

If it is not possible as is, should I suggest it as a new feature?

3 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 01 Jun 2020, 01:38 PM

Hello, Ofer,

We have a specific TextArea component planned for this quarter and it will have some of the TextAreaAutoSize features.

As for the Upload, it has a custom item rendering for the file list, and we can use it to render a text area for each file:

https://www.telerik.com/kendo-react-ui/components/upload/custom-rendering/

If you share more details on how this should look and functions, we can provide more to the point example and/or suggest if a new feature will be required.

Regards,
Stefan
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Ofer
Top achievements
Rank 1
Veteran
answered on 01 Jun 2020, 02:40 PM

Stefan, this can be great if I knew what to use for the default one and then add the textarea on the right of that.

can you tell me what to enter in the "CustomListItemUI" component to simulate the out of the box UI?

Another issue will be to have a property name for the content of the textarea content so I could use it for the save later. maybe something like file.extraText 

If it is not possible right away, I can maybe add a useState with an array of the same length of Upload files to keep what the user's enter.

 

Thank you.

0
Stefan
Telerik team
answered on 02 Jun 2020, 01:33 PM

Hello, Ofer,

Currently, the CustomListItemUI expects a full custom rendering, but we can log a feature request to provide the element that we were about to render as a parameter in the function.

Also, this is how we can attach additional data to the request and then match the text with the file by index:

https://www.telerik.com/kendo-react-ui/components/upload/credentials/#toc-attaching-additional-data-to-requests

Regards,
Stefan
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Ofer
Top achievements
Rank 1
Veteran
Answers by
Stefan
Telerik team
Ofer
Top achievements
Rank 1
Veteran
Share this question
or