Our flexible Kanban board for managing tasks with drag drop


Post by harish22 »

Hi Team,

I’m encountering a UI alignment issue when adding a search input at the column level using the columnToolbar feature in the taskboard. The alignment seems off, especially as I’m using multiple fields within the topItems of the columnToolbar.

I’ve attached a screenshot for your reference. Could you please suggest any improvements or adjustments to resolve this?

Thanks in advance for your help!

columnToolbarsFeature: {
        topItems: {
            // Define a custom text input and search button
            searchInput: {
                type: 'text', // Input field
                placeholder: 'Search tasks...', //🔍
                icon: 'b-fa-search',
                listeners: {
                    input({ source }) {                        
// Capture the input text const value = source.value.trim().toLowerCase(); const column = source.columnRecord; const taskBoard = column.taskBoard; // Iterate through the tasks in the column and highlight matches column.tasks.forEach((task : any) => { const taskElement = taskBoard.getTaskElement(task); if (taskElement) { // Check all relevant fields for matches const isMatch = [ task.name, task.estimatedWorkTime, "Safety Stock" ].some(field => field?.toString().toLowerCase().includes(value)); if (value && isMatch) { taskElement.classList.add('highlight'); } else { taskElement.classList.remove('highlight'); } } }); } } }, clearButton: { type: 'button', icon: 'b-fa-times', // FontAwesome 'times' icon for clear onClick({ source } : any) { const searchInput : any = source.previousSibling; // Access the sibling input field searchInput.value = ''; // Clear the input field const column = source.columnRecord; const taskBoard = column.taskBoard; // Clear highlights if input is empty column.tasks.forEach((task: any) => { const taskElement = taskBoard.getTaskElement(task); if (taskElement) taskElement.classList.remove('highlight'); }); } } }, bottomItems: { addTask : null } },
Attachments
ui alignment.png
ui alignment.png (101.63 KiB) Viewed 433 times

Post by marcio »

Hey harish22,

Thanks for reaching out.

I assembled a CodePen with your configuration and it looks correct, are you able to reproduce that behavior on this demo? https://codepen.io/marciogurka/pen/mybeqjb

Maybe some external CSS is creating this layout?

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post by harish22 »

Hey!

When I click on the above link, it shows an empty preview.

I attached the screenshot.

Attachments
codepen_20241205.png
codepen_20241205.png (147.64 KiB) Viewed 365 times

Post by marcio »

Hey,

That looks strange. Have you tried it on another browser just by chance? I tried to open and it worked just fine.

Attachments
Screen Recording 2024-12-05 at 13.09.22.mov
(3.36 MiB) Downloaded 21 times

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post by harish22 »

I tested the application on both Chrome and Edge browsers, but encountered the same error in both. However, when I tried it on Mozilla Firefox, it worked as expected.

UI alignment might be an issue with my CSS that needs to look.

Additionally, I noticed another issue: when the screen is minimized, the UI alignment breaks when adding a column toolbar. I've attached a screenshot for reference.

Attachments
responsive_toolbar.png
responsive_toolbar.png (66.2 KiB) Viewed 356 times

Post by johan.isaksson »

Hi,

The width of the text fields prevents the columns from shrinking further, making them get out of sync with their headers.
You have some different options for solving that:

A) Easiest - Set a minWidth on the columns (in your column definitions or using CSS), big enough to fit the text field

or

B) Make sure the text fields can shrink as the columns shrink, using CSS

or

C) Use container queries or media queries to hide the text fields on smaller screens

Best regards,
Johan Isaksson

Post Reply