如何使用材料表接口Link to Material Table
例如,我想将搜索placeHolder从" search“更改为"Recherche”。
我已经试过了,但对我不起作用
<MaterialTable
title=""
columns={state.columns}
data={state.data}
options={{
sorting: true,
searchPlaceholder: "recherche"
}}
/>谢谢你的帮忙
发布于 2019-10-24 16:17:43
根据npm package(almost last line)的说法
export interface Localization {
...
toolbar?: {
...
searchPlaceholder?: string;
};
}所以你的代码应该如下所示;
<MaterialTable
title=""
columns={state.columns}
data={state.data}
options={{
sorting: true,
}}
localization={{ toolbar: { searchPlaceholder: 'recherche' } }}
/>发布于 2019-10-24 16:18:17
你试过了吗?
<MaterialTable
title=""
columns={state.columns}
data={state.data}
options={{
sorting: true,
filterPlaceholder: "recherche" // instead of searchPlaceholder
}}
/>或者是toolbar.searchPlaceholder?
发布于 2019-10-24 16:25:34
localization={{ toolbar: { searchPlaceholder: 'Placeholder' } }}https://stackoverflow.com/questions/58536893
复制相似问题