Comments (3)
Thanks for contacting us @reinerosqvist , you need to implement the search process by your self.
from ant-design-blazor.
@using AntDesign.Docs.Services
<Select Style="width: 200px;"
ValueProperty="c=>c"
LabelProperty="c=>c.Name"
DataSource="data"
@bind-Values="@selectedRows"
Mode="multiple"
DropdownMatchSelectWidth="false"
EnableSearch
OnSearch="OnSearch">
<DropdownRender>
<Table @ref="table" DataSource="@data" @bind-SelectedRows="selectedRows" RowKey="x=>x.Name">
<ColumnDefinitions Context="ctx">
<Selection Key="@ctx.Name" />
<PropertyColumn Property="c=>c.Name">
<a>@ctx.Name</a>
</PropertyColumn>
<PropertyColumn Property="c=>c.Age"/>
<PropertyColumn Property="c=>c.Address"/>
</ColumnDefinitions>
</Table>
</DropdownRender>
</Select>
@code
{
ITable table;
IEnumerable<Column> selectedRows=[];
Column[] data;
protected override void OnInitialized()
{
data = dataSource;
base.OnInitialized();
}
void OnSearch(string searchValue)
{
data = dataSource.Where(x => x.Name.Contains(searchValue, StringComparison.InvariantCultureIgnoreCase)).ToArray();
}
class Column
{
public string Name { get; set; }
public int Age { get; set; }
public string Address { get; set; }
}
Column[] dataSource =
{
new Column()
{
Name = "John Brown",
Age = 32,
Address = "New York No. 1 Lake Park",
},
new Column()
{
Name = "Jim Green",
Age = 42,
Address = "London No. 1 Lake Park",
},
new Column()
{
Name = "Joe Black",
Age = 32,
Address = "Sidney No. 1 Lake Park",
},
new Column()
{
Name = "Disabled User",
Age = 99,
Address = "Sidney No. 1 Lake Park",
}
};
}
from ant-design-blazor.
Related Issues (20)
- Select component property LabelName allow other datatypes besides string HOT 1
- Modal removeChild log
- Make CheckboxGroup more generic HOT 2
- Table get all filtered rows
- The TreeSelect control will automatically collapse when a child node is clicked and cannot be selected HOT 1
- Problem with Table and Modal
- Table组件合并单元格,表格初始化的时候会先调用一次RowSpan,ColSpan.即使我的DataSource是空的 HOT 2
- DatePicker Now button breaks when using ShowTime and ChangeOnClose
- datepicker when click <> to switch to prev/next month, will cause form submit, that is unexpect
- When Table Selection is set to Disabled, the context is null. HOT 1
- Upload - ShowUploadList wrong and missing documentation HOT 1
- Table: Determine totals row (SummaryRow) using filter? HOT 1
- BUG Report: Cannot read properties of null (reading 'removeEventListener') HOT 1
- DisabledDate Disable the same year when its available HOT 3
- Can it be used in webview2? HOT 2
- Seems a bug in Dictionary Support in Form HOT 5
- Issue of InputNumber component HOT 2
- Theme using InteractiveAuto HOT 4
- The type 'IsExternalInit' exists in both AntDesign and System.Runtime HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-design-blazor.