oruga-ui / oruga

🐛 Oruga is a lightweight library of UI components without any CSS framework dependency
https://oruga-ui.com
MIT License
1.12k stars 170 forks source link

has-detailed-visible prop on table not working as expected #1036

Closed gciclo closed 3 months ago

gciclo commented 3 months ago

Overview of the problem

Oruga version: [v0.9.0-pre.2] Vuejs version: [3.4.21] OS/Browser: Chrome

Description

Table component prop hasDetailedVisible has no effect on the visibility of the detail icon. It's always visible and does not seem to reflect the prop.

Steps to reproduce

Construct a table with detailed element. <o-table narrowed bordered striped hoverable checkable detailed :has-detailed-visible="(row) => false"> ...

Expected behavior

Expect to not see any detail row icons on the table.

Actual behavior

detail icons are visible for all rows.

mlmoravek commented 3 months ago

Hey, thanks for checking out the pre-release version!

This prop has been renamed to isDetailedVisible, to match other prop names. Try this one :)

Let us know if you find any other bugs.

gciclo commented 3 months ago

Thank you so much!

gciclo commented 3 months ago

Another related quick question - is there a way to programatically trigger opening a detail row (like how you would in buefy with this.$refs.table.openDetailRow(row); ? I tried using update:openedDetailed but I could not get it to work.

mlmoravek commented 3 months ago

If you have specified the rowKey prop or given the customCompare function prop, you can specify v-model:detailedRows (openedDetailed has been renamed detailedRows to match checkedRows).

A detailed list of changes will be in the release nodes when the main 0.9 release is made (I would expect early next month).

If you want the updated docs for the 0.9 pre-release, I would suggest cloning the develop branch of the oruga repo, installing the dependencies (npm i) and running the docs for 0.9 locally with npm run dev:watch.