fix: 修复表格搜索不能用,表单删除样式显示 (#1256)
Co-authored-by: sealday <zhanglin@daoyoucloud.com> Co-authored-by: sealday <sealday@gmail.com> Reviewed-on: daoyoucloud/tachybase#1256 Co-authored-by: wjh <wwwjh0710@163.com> Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
parent
6c9f9cd8a8
commit
2db816a872
@ -332,6 +332,7 @@ export class BuiltInPlugin extends Plugin {
|
||||
name: 'pinned-list',
|
||||
config: {
|
||||
items: {
|
||||
ui: { order: 50, component: 'DesignableSwitch', pin: true, snippet: 'ui.*' },
|
||||
wf: { order: 100, component: 'WorkflowLink', pin: true, snippet: 'pm.*' },
|
||||
ds: { order: 200, component: 'DatasourceLink', pin: true, snippet: 'pm.*' },
|
||||
pm: { order: 300, component: 'PluginManagerLink', pin: true, snippet: 'pm' },
|
||||
|
@ -184,10 +184,9 @@ const Copy = forwardRef<HTMLButtonElement, CommonProps>((props, ref) => {
|
||||
if (array.field?.pattern !== 'editable') return null;
|
||||
return wrapSSR(
|
||||
<Button
|
||||
ghost
|
||||
{...props}
|
||||
type="text"
|
||||
style={{
|
||||
padding: '0 0 0 6px',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
...props.style,
|
||||
@ -226,10 +225,9 @@ const Remove = forwardRef<HTMLSpanElement, CommonProps>((props, ref) => {
|
||||
if (array.field?.pattern !== 'editable') return null;
|
||||
return wrapSSR(
|
||||
<Button
|
||||
ghost
|
||||
type="text"
|
||||
{...props}
|
||||
style={{
|
||||
padding: '0 0 0 6px',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
...props.style,
|
||||
@ -268,10 +266,9 @@ const MoveDown = forwardRef<HTMLSpanElement, CommonProps>((props, ref) => {
|
||||
if (array.field?.pattern !== 'editable') return null;
|
||||
return (
|
||||
<Button
|
||||
ghost
|
||||
{...props}
|
||||
type="text"
|
||||
style={{
|
||||
padding: '0 0 0 6px',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
...props.style,
|
||||
@ -309,10 +306,9 @@ const MoveUp = forwardRef<HTMLSpanElement, CommonProps>((props, ref) => {
|
||||
if (array.field?.pattern !== 'editable') return null;
|
||||
return (
|
||||
<Button
|
||||
ghost
|
||||
type="text"
|
||||
{...props}
|
||||
style={{
|
||||
padding: '0 0 0 6px',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
...props.style,
|
||||
|
@ -93,7 +93,7 @@ export const useTabSearchCollapsibleInputItemAction = (props) => {
|
||||
const onInputChange = (v) => {
|
||||
const timeout = { current: null };
|
||||
clearTimeout(timeout.current);
|
||||
const inputValue = v.target?.value || v;
|
||||
const inputValue = v.target?.value ?? v;
|
||||
setValue(inputValue);
|
||||
if (inputValue === '') {
|
||||
timeout.current = setTimeout(() => {
|
||||
@ -101,6 +101,7 @@ export const useTabSearchCollapsibleInputItemAction = (props) => {
|
||||
}, 2000);
|
||||
}
|
||||
};
|
||||
|
||||
const onButtonClick = () => {
|
||||
onSelect(value);
|
||||
};
|
||||
|
@ -23,9 +23,13 @@ export const useTabSearchCollapsibleInputItem = () => {
|
||||
// 保留原有的 filter
|
||||
let storedFilter = block.service.params?.[1]?.filters || {};
|
||||
if (value.length) {
|
||||
if (value[0]) {
|
||||
storedFilter[key] = {
|
||||
[filterKey]: value,
|
||||
};
|
||||
} else {
|
||||
delete storedFilter[key]?.[filterKey];
|
||||
}
|
||||
|
||||
if (canBeCalculatedField) {
|
||||
storedFilter[key] = {
|
||||
|
Loading…
Reference in New Issue
Block a user