Skip to content

Commit 1327db1

Browse files
xristianstefanovTsvetomir-Hr
authored andcommitted
Update knowledge-base/fileselect-blazor-initial-files.md
Co-authored-by: Tsvetomir Hristov <[email protected]>
1 parent 848d835 commit 1327db1

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

knowledge-base/fileselect-blazor-initial-files.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,17 @@ The root cause of the issue is that the `Files` parameter of the FileSelect comp
3232

3333
To ensure that the FileSelect component reflects changes made to the `Files` parameter, you’ll need to recreate the FileSelect component.
3434

35-
`````Razor
35+
`````RAZOR
3636
@if (ShouldRenderFileSelect)
3737
{
3838
<TelerikFileSelect @ref="@FileSelectRef"
3939
Class="required"
4040
Files="@InitialFiles"
41-
Multiple="true"
42-
OnSelect="@OnSelectHandler"
43-
OnRemove="@OnFileRemoved" />
41+
Multiple="true" />
4442
}
4543
4644
@code {
47-
private TelerikFileSelect FileSelectRef { get; set; }
45+
private TelerikFileSelect? FileSelectRef { get; set; }
4846
private List<FileSelectFileInfo> InitialFiles = new();
4947
private List<OSRFileInfoResponse> Files = new();
5048
private bool ShouldRenderFileSelect { get; set; } = true;
@@ -97,21 +95,6 @@ To ensure that the FileSelect component reflects changes made to the `Files` par
9795
});
9896
}
9997
100-
private void OnSelectHandler()
101-
{
102-
// OnSelect logic
103-
}
104-
105-
private void OnFileRemoved()
106-
{
107-
// OnRemove logic
108-
}
109-
110-
private void DownloadFileFromStream(byte[] buffer, string fileName)
111-
{
112-
// Simulate file download
113-
}
114-
11598
public class OSRFileInfoResponse
11699
{
117100
public byte[]? Buffer { get; set; }
@@ -121,4 +104,3 @@ To ensure that the FileSelect component reflects changes made to the `Files` par
121104
public string? Name => FileName?.Split("/").LastOrDefault();
122105
}
123106
}
124-
`````

0 commit comments

Comments
 (0)